Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2017-05-26 13:41:19 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2017-05-26 13:41:19 +0300
commitc4fde6fc6b073dba0d5cc694702e5bdec1e7088e (patch)
tree0d1bb4d181ad89beeaaf55ad011d7e53d740a937
parenta793f6c3d9ffe00f82678c50438ab5b6b8a2fab1 (diff)
6.6.5 releasev6.6.5
Former-commit-id: bb683dcd96f2c50a2b24aa64e0abe97bc15b946d
-rw-r--r--ChangeLog5
-rw-r--r--VERSION2
-rw-r--r--etc/build/build.xml19
-rw-r--r--etc/electron/ElectronApp.js2
-rw-r--r--war/cache.manifest2
-rw-r--r--war/js/app.min.js1194
-rw-r--r--war/js/atlas-viewer.min.js840
-rw-r--r--war/js/atlas.min.js1212
-rw-r--r--war/js/diagramly/Dialogs.js552
-rw-r--r--war/js/diagramly/Editor.js552
-rw-r--r--war/js/diagramly/EditorUi.js41
-rw-r--r--war/js/diagramly/GraphViewer.js25
-rw-r--r--war/js/diagramly/Menus.js23
-rw-r--r--war/js/diagramly/vsdx/VsdxExport.js294
-rw-r--r--war/js/diagramly/vsdx/mxVsdxCanvas2D.js22
-rw-r--r--war/js/embed-static.min.js2
-rw-r--r--war/js/mxgraph/Dialogs.js898
-rw-r--r--war/js/mxgraph/Editor.js903
-rw-r--r--war/js/mxgraph/EditorUi.js38
-rw-r--r--war/js/reader.min.js2
-rw-r--r--war/js/viewer.min.js864
21 files changed, 3928 insertions, 3564 deletions
diff --git a/ChangeLog b/ChangeLog
index 805ed721..107f9d16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+25-MAY-2017: 6.6.5
+
+- Adds print option in lightbox
+- Moves insert to arrange menu
+
24-MAY-2017: 6.6.4
- Fixes possible data loss for back button
diff --git a/VERSION b/VERSION
index a08b5f1e..653877f1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-6.6.4 \ No newline at end of file
+6.6.5 \ No newline at end of file
diff --git a/etc/build/build.xml b/etc/build/build.xml
index f77bf255..11a0f0f7 100644
--- a/etc/build/build.xml
+++ b/etc/build/build.xml
@@ -50,7 +50,7 @@
<copy file="${war.dir}/styles/default.xml" tofile="${basedir}/.tmp1.xml" overwrite="true"/>
<replaceregexp file="${basedir}/.tmp1.xml" match="${line.separator}" flags="g" replace=""/>
<replaceregexp file="${basedir}/.tmp1.xml" match="\t" flags="g" replace=""/>
- <replaceregexp file="${basedir}/.tmp1.xml" match="'" replace="\\\\'" byline="true"/>
+ <replaceregexp file="${basedir}/.tmp1.xml" match="'" flags="g" replace="\\\\'" byline="true"/>
<delete file="${basedir}/Graph-Stylesheet.js"/>
<echo file="${basedir}/Graph-Stylesheet.js">Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName] = mxUtils.parseXml('</echo>
@@ -61,6 +61,20 @@
</concat>
<echo file="${basedir}/Graph-Stylesheet.js" append="true">').documentElement;</echo>
+ <delete file="${basedir}/.tmp2.js"/>
+ <copy file="${war.dir}/resources/dia.txt" tofile="${basedir}/.tmp2.xml" overwrite="true"/>
+ <replaceregexp file="${basedir}/.tmp2.xml" match="${line.separator}" flags="g" replace="\\\\n"/>
+ <replaceregexp file="${basedir}/.tmp2.xml" match="'" flags="g" replace="\\\\'" byline="true"/>
+
+ <delete file="${basedir}/Graph-Resources.js"/>
+ <echo file="${basedir}/Graph-Resources.js">mxResources.parse('</echo>
+ <concat destfile="${basedir}/Graph-Resources.js" fixlastline="no" append="true">
+ <filelist dir="${basedir}">
+ <file name=".tmp2.xml" />
+ </filelist>
+ </concat>
+ <echo file="${basedir}/Graph-Resources.js" append="true">');</echo>
+
<jscomp compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/grapheditor.min.js">
<sources dir="${grapheditor.dir}">
<file name="Editor.js" />
@@ -162,6 +176,7 @@
</sources>
<sources dir="${basedir}">
+ <file name="Graph-Resources.js" />
<file name="Graph-Stylesheet.js" />
</sources>
@@ -171,6 +186,7 @@
</jscomp>
<delete file="${basedir}/.tmp1.xml"/>
+ <delete file="${basedir}/.tmp2.xml"/>
<echo file="${basedir}/.tmp1.js">
(function()
@@ -346,6 +362,7 @@
<replace file="${war.dir}/js/app.min.js" token="@DRAWIO-VERSION@" value="${version}"/>
<delete file="${basedir}/Graph-Stylesheet.js"/>
+ <delete file="${basedir}/Graph-Resources.js"/>
<delete file="${basedir}/grapheditor.min.js"/>
<delete file="${basedir}/sidebar.min.js"/>
</target>
diff --git a/etc/electron/ElectronApp.js b/etc/electron/ElectronApp.js
index 000b2632..bd902c98 100644
--- a/etc/electron/ElectronApp.js
+++ b/etc/electron/ElectronApp.js
@@ -95,8 +95,6 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email';
this.put('extras', new Menu(mxUtils.bind(this, function(menu, parent)
{
- this.addSubmenu('insert', menu, parent);
- menu.addSeparator(parent);
this.addMenuItems(menu, ['copyConnect', 'collapseExpand', '-', 'mathematicalTypesetting', 'autosave', '-',
'createShape', 'editDiagram', '-', 'tags', '-', 'online'], parent);
})));
diff --git a/war/cache.manifest b/war/cache.manifest
index 9f2d5818..1900f98a 100644
--- a/war/cache.manifest
+++ b/war/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 05/24/2017 04:23 PM
+# 05/26/2017 12:24 PM
app.html
index.html?offline=1
diff --git a/war/js/app.min.js b/war/js/app.min.js
index bd9bf10d..ff24e274 100644
--- a/war/js/app.min.js
+++ b/war/js/app.min.js
@@ -43,19 +43,19 @@ 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=[],d=-1,e;for(e in a){var c=a[e];"string"===typeof c&&(b[++d]=e,b[++d]=c)}a=b}for(var b=[],d="",f=0;f<a.length;)e=a[f++],c=a[f++],b.push(d,encodeURIComponent(e.toString())),d="&",c&&b.push("=",encodeURIComponent(c.toString()));this.l=b.join("")};f.prototype.fa=function(a){this.o=a?a:null};f.prototype.Z=function(){return null!==this.o};
var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,n=/[#\/\?@]/g,p=/[\#\?]/g;f.parse=a;f.create=function(a,e,c,g,k,l,m){a=new f(b(a,n),b(e,n),"string"==typeof c?encodeURIComponent(c):null,0<g?g.toString():null,b(k,p),null,"string"==typeof m?encodeURIComponent(m):null);l&&("string"===typeof l?a.O(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):a.ba(l));return a};f.N=c;f.ma=e;f.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},
-N:function(b,d){return b?c(a(b),a(d)).toString():""+d}};return f}();"undefined"!==typeof window&&(window.URI=e);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(A,d)+'")':'url("about:blank")'}function d(a){return B[a]}function f(a,b){return a?e.ha.N(a,b):b}function p(a,b,d){if(!d)return null;var e=(""+a).match(z);return!e||e[1]&&!C.test(e[1])?null:d(a,b)}function y(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
-"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},z=/^(?:([^:/?# ]+):)?/,C=/^(?:https?|mailto|data)$/i;g=function(){var d={};return function H(e,g,k,l,m){e=y(e);var n=c[e];if(n&&"object"===typeof n){for(var q=n.cssPropBits,t=q&80,v=q&1536,u=NaN,x=0,A=0;x<g.length;++x){var D=g[x].toLowerCase(),z=D.charCodeAt(0),B,C,F,J,E,I;if(32===z)D="";else if(34===z)D=16===t?k?a(p(f(l,b(g[x].substring(1,D.length-1))),e,k)):"":
-q&8&&!(t&t-1)?D:"";else if("inherit"!==D){if(E=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var Q=E.length;0<=--Q;)for(var Z=E[Q],M=Z.length;0<=--M;)L[Z[M]]=d;L=n.cssLitMap=L}E=L}else E=d;if(I=E,I[y(D)]!==d)if(35===z&&/^#(?:[0-9a-f]{3}){1,2}$/.test(D))D=q&2?D:"";else if(48<=z&&57>=z)D=q&1?D:"";else if(B=D.charCodeAt(1),C=D.charCodeAt(2),F=48<=B&&57>=B,J=48<=C&&57>=C,43===z&&(F||46===B&&J))D=q&1?(F?"":"0")+D.substring(1):"";else if(45===z&&(F||46===B&&J))D=q&4?(F?"-":"-0")+D.substring(1):q&1?
-"0":"";else if(46===z&&F)D=q&1?"0"+D:"";else if('url("'===D.substring(0,5))D=k&&q&16?a(p(f(l,g[x].substring(5,D.length-2)),e,k)):"";else if("("===D.charAt(D.length-1))a:{E=g;L=x;D=1;Q=L+1;for(z=E.length;Q<z&&D;)Z=E[Q++],D+=")"===Z?-1:/^[^"']*\($/.test(Z);if(!D)for(D=E[L].toLowerCase(),z=y(D),E=E.splice(L,Q-L,""),L=n.cssFns,Q=0,Z=L.length;Q<Z;++Q)if(L[Q].substring(0,z.length)==z){E[0]=E[E.length-1]="";H(L[Q],E,k,l);D=D+E.join(" ")+")";break a}D=""}else D=v&&/^-?[a-z_][\w\-]*$/.test(D)&&!/__$/.test(D)?
-m&&512===v?g[x]+m:1024===v&&c[D]&&"number"===typeof c[D].oa?D:"":/^\w+$/.test(D)&&64===t&&q&8?u+1===A?(g[u]=g[u].substring(0,g[u].length-1)+" "+D+'"',""):(u=A,'"'+D+'"'):""}D&&(g[A++]=D)}1===A&&'url("about:blank")'===g[0]&&(A=0);g.length=A}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)$/,
+N:function(b,d){return b?c(a(b),a(d)).toString():""+d}};return f}();"undefined"!==typeof window&&(window.URI=e);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(y,d)+'")':'url("about:blank")'}function d(a){return B[a]}function f(a,b){return a?e.ha.N(a,b):b}function p(a,b,d){if(!d)return null;var e=(""+a).match(A);return!e||e[1]&&!C.test(e[1])?null:d(a,b)}function z(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
+"")}var y=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},A=/^(?:([^:/?# ]+):)?/,C=/^(?:https?|mailto|data)$/i;g=function(){var d={};return function H(e,g,k,l,m){e=z(e);var n=c[e];if(n&&"object"===typeof n){for(var q=n.cssPropBits,t=q&80,v=q&1536,u=NaN,x=0,A=0;x<g.length;++x){var y=g[x].toLowerCase(),D=y.charCodeAt(0),B,C,F,J,E,I;if(32===D)y="";else if(34===D)y=16===t?k?a(p(f(l,b(g[x].substring(1,y.length-1))),e,k)):"":
+q&8&&!(t&t-1)?y:"";else if("inherit"!==y){if(E=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var Q=E.length;0<=--Q;)for(var aa=E[Q],M=aa.length;0<=--M;)L[aa[M]]=d;L=n.cssLitMap=L}E=L}else E=d;if(I=E,I[z(y)]!==d)if(35===D&&/^#(?:[0-9a-f]{3}){1,2}$/.test(y))y=q&2?y:"";else if(48<=D&&57>=D)y=q&1?y:"";else if(B=y.charCodeAt(1),C=y.charCodeAt(2),F=48<=B&&57>=B,J=48<=C&&57>=C,43===D&&(F||46===B&&J))y=q&1?(F?"":"0")+y.substring(1):"";else if(45===D&&(F||46===B&&J))y=q&4?(F?"-":"-0")+y.substring(1):
+q&1?"0":"";else if(46===D&&F)y=q&1?"0"+y:"";else if('url("'===y.substring(0,5))y=k&&q&16?a(p(f(l,g[x].substring(5,y.length-2)),e,k)):"";else if("("===y.charAt(y.length-1))a:{E=g;L=x;y=1;Q=L+1;for(D=E.length;Q<D&&y;)aa=E[Q++],y+=")"===aa?-1:/^[^"']*\($/.test(aa);if(!y)for(y=E[L].toLowerCase(),D=z(y),E=E.splice(L,Q-L,""),L=n.cssFns,Q=0,aa=L.length;Q<aa;++Q)if(L[Q].substring(0,D.length)==D){E[0]=E[E.length-1]="";H(L[Q],E,k,l);y=y+E.join(" ")+")";break a}y=""}else y=v&&/^-?[a-z_][\w\-]*$/.test(y)&&!/__$/.test(y)?
+m&&512===v?g[x]+m:1024===v&&c[y]&&"number"===typeof c[y].oa?y:"":/^\w+$/.test(y)&&64===t&&q&8?u+1===A?(g[u]=g[u].substring(0,g[u].length-1)+" "+y+'"',""):(u=A,'"'+y+'"'):""}y&&(g[A++]=y)}1===A&&'url("about:blank")'===g[0]&&(A=0);g.length=A}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)$/,
F={};F[">"]=F["+"]=F["~"]=F;k=function(a,b,d){function e(e,l){function m(d,e,c){var k,l,m,p,t,v=!0;k="";d<e&&((t=a[d],"*"===t)?(++d,k=t):/^[a-zA-Z]/.test(t)&&(l=g(t.toLowerCase(),[]))&&("tagName"in l&&(t=l.tagName),++d,k=t));for(p=m=l="";v&&d<e;++d)if(t=a[d],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?v=!1:l+=t+f;else if("."===t)++d<e&&/^[0-9A-Za-z:_\-]+$/.test(t=a[d])&&!/^_|__$/.test(t)?l+="."+t:v=!1;else if(d+1<e&&"["===a[d]){++d;var u=a[d++].toLowerCase();t=q.m[k+"::"+u];t!==+t&&(t=q.m["*::"+
-u]);var x;b.ia?(x=b.ia(k,u),"string"!==typeof x&&(v=!1,x=u),v&&t!==+t&&(t=q.d.NONE)):(x=u,t!==+t&&(v=!1));var y=u="",H=!1;/^[~^$*|]?=$/.test(a[d])&&(u=a[d++],y=a[d++],/^[0-9A-Za-z:_\-]+$/.test(y)?y='"'+y+'"':"]"===y&&(y='""',--d),/^"([^\"\\]|\\.)*"$/.test(y)||(v=!1),(H="i"===a[d])&&++d);"]"!==a[d]&&(++d,v=!1);switch(t){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==u&&"~="!==u&&"$="!==u||'""'==y||H?"|="===u||""===u||(v=!1):y='"'+y.substring(1,
-y.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==u&&(v=!1);break;default:v=!1}v&&(m+="["+x.replace(/[^\w-]/g,"\\$&")+u+y+(H?" i]":"]"))}else if(d<e&&":"===a[d])if(t=a[++d],E.test(t))p+=":"+t;else break;else break;d!==e&&(v=!1);v&&(d=(k+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+c)&&n.push(d);return v}" "===a[e]&&++e;l-1!==e&&" "===a[l]&&--l;for(var n=[],p=e,t=!0,v=e;t&&v<l;++v){var u=a[v];if(F[u]===F||" "===u)m(p,v,u)?p=v+1:t=!1}m(p,l,"")||(t=!1);return t?(n.length&&(p=n.join(""),null!==
+u]);var x;b.ia?(x=b.ia(k,u),"string"!==typeof x&&(v=!1,x=u),v&&t!==+t&&(t=q.d.NONE)):(x=u,t!==+t&&(v=!1));var z=u="",H=!1;/^[~^$*|]?=$/.test(a[d])&&(u=a[d++],z=a[d++],/^[0-9A-Za-z:_\-]+$/.test(z)?z='"'+z+'"':"]"===z&&(z='""',--d),/^"([^\"\\]|\\.)*"$/.test(z)||(v=!1),(H="i"===a[d])&&++d);"]"!==a[d]&&(++d,v=!1);switch(t){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==u&&"~="!==u&&"$="!==u||'""'==z||H?"|="===u||""===u||(v=!1):z='"'+z.substring(1,
+z.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==u&&(v=!1);break;default:v=!1}v&&(m+="["+x.replace(/[^\w-]/g,"\\$&")+u+z+(H?" i]":"]"))}else if(d<e&&":"===a[d])if(t=a[++d],E.test(t))p+=":"+t;else break;else break;d!==e&&(v=!1);v&&(d=(k+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+c)&&n.push(d);return v}" "===a[e]&&++e;l-1!==e&&" "===a[l]&&--l;for(var n=[],p=e,t=!0,v=e;t&&v<l;++v){var u=a[v];if(F[u]===F||" "===u)m(p,v,u)?p=v+1:t=!1}m(p,l,"")||(t=!1);return t?(n.length&&(p=n.join(""),null!==
c&&(p="."+c+" "+p),k.push(p)),!0):!d||d(a.slice(e,l))}var c=b.na,f=b.L,g=b.Aa,k=[],l=0,m,n=0,p;for(m=0;m<a.length;++m)(p=a[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==a[m]&&(n||F[a[m-1]]===F||F[a[m+1]]===F))||(a[l++]=a[m]);a.length=l;l=a.length;for(m=n=0;m<l;++m)if(","===a[m]){if(!e(n,m))return null;n=m+1}return e(n,l)?k: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;
-m=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return d.length?b.test(d)?a.test(d)?d:"not all , "+d:"not all":""}})();(function(){function a(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,e=/^\s*url\s*[(][']([^']*)['][)]\s*$/,c=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(a))||(f=b.exec(a))||(f=d.exec(a))||(f=e.exec(a))||(f=c.exec(a))?f[1]:null}function b(d,e,c,l,q,t,v){function u(){A=
-H.length&&null===H[H.length-1]}var x=void 0,y=v||[0],H=[],A=!1;n(e,{startStylesheet:function(){x=[]},endStylesheet:function(){},startAtrule:function(e,g){if(A)e=null;else if("@media"===e)x.push("@media"," ",m(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var k=g[0];1!==g.length||/__$|[^\w\-]/.test(k)?e=null:(x.push(e," ",k+c.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof t){var n=m(g.slice(1));if("not all"!==n){++y[0];var v=[];x.push(v);var u=p(f(d,a(g[0])),
-function(a){var d=b(u,a.qa,c,l,q,t,y);--y[0];a=n?{toString:function(){return"@media "+n+" {"+d.result+"}"}}:d.result;v[0]=a;t(a,!!y[0])},q)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");A=!e;H.push(e)},endAtrule:function(){H.pop();A||x.push(";");u()},startBlock:function(){A||x.push("{")},endBlock:function(){A||(x.push("}"),A=!0)},startRuleset:function(a){if(!A){var b=void 0;"@keyframes"===H[H.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-A=!b,b&&(b=b[0].replace(/ +/g,""))):(a=k(a,c),a&&a.length?b=a.join(", "):A=!0);A||x.push(b,"{")}H.push(null)},endRuleset:function(){H.pop();A||x.push("}");u()},declaration:function(a,b){if(!A){var e=!1,f=b.length;2<=f&&"!"===b[f-2]&&"important"===b[f-1].toLowerCase()&&(e=!0,b.length-=2);g(a,b,l,d,c.L);b.length&&x.push(a,":",b.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return x.join("")}},va:!!y[0]}}l=function(a,d,e,c){return b(a,d,e,c,void 0,void 0).result.toString()}})()})();
+m=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return d.length?b.test(d)?a.test(d)?d:"not all , "+d:"not all":""}})();(function(){function a(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,e=/^\s*url\s*[(][']([^']*)['][)]\s*$/,c=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(a))||(f=b.exec(a))||(f=d.exec(a))||(f=e.exec(a))||(f=c.exec(a))?f[1]:null}function b(d,e,c,l,q,t,v){function u(){H=
+y.length&&null===y[y.length-1]}var x=void 0,z=v||[0],y=[],H=!1;n(e,{startStylesheet:function(){x=[]},endStylesheet:function(){},startAtrule:function(e,g){if(H)e=null;else if("@media"===e)x.push("@media"," ",m(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var k=g[0];1!==g.length||/__$|[^\w\-]/.test(k)?e=null:(x.push(e," ",k+c.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof t){var n=m(g.slice(1));if("not all"!==n){++z[0];var v=[];x.push(v);var u=p(f(d,a(g[0])),
+function(a){var d=b(u,a.qa,c,l,q,t,z);--z[0];a=n?{toString:function(){return"@media "+n+" {"+d.result+"}"}}:d.result;v[0]=a;t(a,!!z[0])},q)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");H=!e;y.push(e)},endAtrule:function(){y.pop();H||x.push(";");u()},startBlock:function(){H||x.push("{")},endBlock:function(){H||(x.push("}"),H=!0)},startRuleset:function(a){if(!H){var b=void 0;"@keyframes"===y[y.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+H=!b,b&&(b=b[0].replace(/ +/g,""))):(a=k(a,c),a&&a.length?b=a.join(", "):H=!0);H||x.push(b,"{")}y.push(null)},endRuleset:function(){y.pop();H||x.push("}");u()},declaration:function(a,b){if(!H){var e=!1,f=b.length;2<=f&&"!"===b[f-2]&&"important"===b[f-1].toLowerCase()&&(e=!0,b.length-=2);g(a,b,l,d,c.L);b.length&&x.push(a,":",b.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return x.join("")}},va:!!z[0]}}l=function(a,d,e,c){return b(a,d,e,c,void 0,void 0).result.toString()}})()})();
"undefined"!==typeof window&&(window.sanitizeCssProperty=g,window.sanitizeCssSelectorList=k,window.sanitizeStylesheet=l,window.sanitizeMediaQuery=m);var n,p;(function(){function a(a,d,e,c,f){for(var g=d++;d<e&&"{"!==a[d]&&";"!==a[d];)++d;if(d<e&&(f||";"===a[d])){f=g+1;var k=d;f<e&&" "===a[f]&&++f;k>f&&" "===a[k-1]&&--k;c.startAtrule&&c.startAtrule(a[g].toLowerCase(),a.slice(f,k));d="{"===a[d]?b(a,d,e,c):d+1;c.endAtrule&&c.endAtrule()}return d}function b(d,c,f,g){++c;for(g.startBlock&&g.startBlock();c<
f;){var k=d[c].charAt(0);if("}"==k){++c;break}c=" "===k||";"===k?c+1:"@"===k?a(d,c,f,g,!1):"{"===k?b(d,c,f,g):e(d,c,f,g)}g.endBlock&&g.endBlock();return c}function e(a,b,d,e){var f=b,k=c(a,b,d,!0);if(0>k)return k=~k,k===f?k+1:k;var l=a[k];if("{"!==l)return k===f?k+1:k;b=k+1;k>f&&" "===a[k-1]&&--k;for(e.startRuleset&&e.startRuleset(a.slice(f,k));b<d;){l=a[b];if("}"===l){++b;break}b=" "===l?b+1:g(a,b,d,e)}e.endRuleset&&e.endRuleset();return b}function c(a,b,d,e){for(var c,f=[],g=-1;b<d;++b)if(c=a[b].charAt(0),
"["===c||"("===c)f[++g]=c;else if("]"===c&&"["===f[g]||")"===c&&"("===f[g])--g;else if("{"===c||"}"===c||";"===c||"@"===c||":"===c&&!e)break;0<=g&&(b=~(b+1));return b}function f(a,b,d){for(;b<d&&";"!==a[b]&&"}"!==a[b];)++b;return b<d&&";"===a[b]?b+1:b}function g(a,b,d,e){var g=a[b++];if(!k.test(g))return f(a,b,d);b<d&&" "===a[b]&&++b;if(b==d||":"!==a[b])return f(a,b,d);++b;b<d&&" "===a[b]&&++b;var l=c(a,b,d,!1);if(0>l)l=~l;else{for(var m=[],n=0,p=b;p<l;++p)b=a[p]," "!==b&&(m[n++]=b);if(l<d){do{b=
@@ -79,21 +79,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"};q.ELEMENT_DOM_INTERFACES=q.Q;q.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};q.ueffects=q.P;q.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};
-q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(a){function b(a,b){var d;if(W.hasOwnProperty(b))d=W[b];else{var e=b.match(O);d=e?String.fromCharCode(parseInt(e[1],10)):(e=b.match(G))?String.fromCharCode(parseInt(e[1],
-16)):N&&X.test(b)?(N.innerHTML="&"+b+";",e=N.textContent,W[b]=e):"&"+b+";"}return d}function d(a){return a.replace(Y,b)}function c(a){return(""+a).replace(P,"&amp;").replace(V,"&lt;").replace(ea,"&gt;").replace(ba,"&#34;")}function f(a){return a.replace(S,"&amp;$1").replace(V,"&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,d){var e,c=/(<\/|<\!--|<[!?]|[&<>])/g;
-e=a+"";if(aa)e=e.split(c);else{for(var f=[],g=0,k;null!==(k=c.exec(e));)f.push(e.substring(g,k.index)),f.push(k[0]),g=k.index+k[0].length;f.push(e.substring(g));e=f}l(b,e,0,{r:!1,C:!1},d)}}function k(a,b,d,e,c){return function(){l(a,b,d,e,c)}}function l(b,d,e,c,f){try{b.H&&0==e&&b.H(f);for(var g,l,p,q=d.length;e<q;){var t=d[e++],v=d[e];switch(t){case "&":R.test(v)?(b.e&&b.e("&"+v,f,U,k(b,d,e,c,f)),e++):b.e&&b.e("&amp;",f,U,k(b,d,e,c,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(v))if(g[0].length===
-v.length&&">"===d[e+1])e+=2,p=g[1].toLowerCase(),b.t&&b.t(p,f,U,k(b,d,e,c,f));else{var u=d,x=e,y=b,H=f,A=U,D=c,z=n(u,x);z?(y.t&&y.t(z.name,H,A,k(y,u,x,D,H)),e=z.next):e=u.length}else b.e&&b.e("&lt;/",f,U,k(b,d,e,c,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(v))if(g[0].length===v.length&&">"===d[e+1]){e+=2;p=g[1].toLowerCase();b.w&&b.w(p,[],f,U,k(b,d,e,c,f));var B=a.f[p];B&ca&&(e=m(d,{name:p,next:e,c:B},b,f,U,c))}else{var u=d,x=b,y=f,H=U,A=c,G=n(u,e);G?(x.w&&x.w(G.name,G.R,y,H,k(x,u,G.next,A,y)),
-e=G.c&ca?m(u,G,x,y,H,A):G.next):e=u.length}else b.e&&b.e("&lt;",f,U,k(b,d,e,c,f));break;case "\x3c!--":if(!c.C){for(l=e+1;l<q&&(">"!==d[l]||!/--$/.test(d[l-1]));l++);if(l<q){if(b.A){var N=d.slice(e,l).join("");b.A(N.substr(0,N.length-2),f,U,k(b,d,l+1,c,f))}e=l+1}else c.C=!0}c.C&&b.e&&b.e("&lt;!--",f,U,k(b,d,e,c,f));break;case "<!":if(/^\w/.test(v)){if(!c.r){for(l=e+1;l<q&&">"!==d[l];l++);l<q?e=l+1:c.r=!0}c.r&&b.e&&b.e("&lt;!",f,U,k(b,d,e,c,f))}else b.e&&b.e("&lt;!",f,U,k(b,d,e,c,f));break;case "<?":if(!c.r){for(l=
-e+1;l<q&&">"!==d[l];l++);l<q?e=l+1:c.r=!0}c.r&&b.e&&b.e("&lt;?",f,U,k(b,d,e,c,f));break;case ">":b.e&&b.e("&gt;",f,U,k(b,d,e,c,f));break;case "":break;default:b.e&&b.e(t,f,U,k(b,d,e,c,f))}}b.B&&b.B(f)}catch(ga){if(ga!==U)throw ga;}}function m(b,d,e,c,g,l){var m=b.length;Z.hasOwnProperty(d.name)||(Z[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=Z[d.name],p=d.next,q=d.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(d.c&a.c.CDATA)e.z&&e.z(m,c,g,k(e,b,
-q,l,c));else if(d.c&a.c.RCDATA)e.F&&e.F(f(m),c,g,k(e,b,q,l,c));else throw Error("bug");return q}function n(b,e){var c=/^([-\w:]+)/.exec(b[e]),f={};f.name=c[1].toLowerCase();f.c=a.f[f.name];for(var g=b[e].substr(c[0].length),k=e+1,l=b.length;k<l&&">"!==b[k];k++)g+=b[k];if(!(l<=k)){for(var m=[];""!==g;)if(c=T.exec(g))if(c[4]&&!c[5]||c[6]&&!c[7]){for(var c=c[4]||c[6],n=!1,g=[g,b[k++]];k<l;k++){if(n){if(">"===b[k])break}else 0<=b[k].indexOf(c)&&(n=!0);g.push(b[k])}if(l<=k)break;g=g.join("")}else{var n=
-c[1].toLowerCase(),p;if(c[2]){p=c[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=d(p.replace(da,""))}else p="";m.push(n,p);g=g.substr(c[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=k+1;return f}}function p(b){function d(a,b){f||b.push(a)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(d,g,k){if(!f&&a.f.hasOwnProperty(d)){var l=a.f[d];if(!(l&a.c.FOLDABLE)){var m=b(d,g);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
+q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(a){function b(a,b){var d;if(X.hasOwnProperty(b))d=X[b];else{var e=b.match(N);d=e?String.fromCharCode(parseInt(e[1],10)):(e=b.match(G))?String.fromCharCode(parseInt(e[1],
+16)):O&&W.test(b)?(O.innerHTML="&"+b+";",e=O.textContent,X[b]=e):"&"+b+";"}return d}function d(a){return a.replace(Y,b)}function c(a){return(""+a).replace(P,"&amp;").replace(V,"&lt;").replace(da,"&gt;").replace(Z,"&#34;")}function f(a){return a.replace(R,"&amp;$1").replace(V,"&lt;").replace(da,"&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,d){var e,c=/(<\/|<\!--|<[!?]|[&<>])/g;
+e=a+"";if(ba)e=e.split(c);else{for(var f=[],g=0,k;null!==(k=c.exec(e));)f.push(e.substring(g,k.index)),f.push(k[0]),g=k.index+k[0].length;f.push(e.substring(g));e=f}l(b,e,0,{r:!1,C:!1},d)}}function k(a,b,d,e,c){return function(){l(a,b,d,e,c)}}function l(b,d,e,c,f){try{b.H&&0==e&&b.H(f);for(var g,l,p,q=d.length;e<q;){var t=d[e++],v=d[e];switch(t){case "&":S.test(v)?(b.e&&b.e("&"+v,f,U,k(b,d,e,c,f)),e++):b.e&&b.e("&amp;",f,U,k(b,d,e,c,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(v))if(g[0].length===
+v.length&&">"===d[e+1])e+=2,p=g[1].toLowerCase(),b.t&&b.t(p,f,U,k(b,d,e,c,f));else{var u=d,x=e,z=b,y=f,H=U,A=c,B=n(u,x);B?(z.t&&z.t(B.name,y,H,k(z,u,x,A,y)),e=B.next):e=u.length}else b.e&&b.e("&lt;/",f,U,k(b,d,e,c,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(v))if(g[0].length===v.length&&">"===d[e+1]){e+=2;p=g[1].toLowerCase();b.w&&b.w(p,[],f,U,k(b,d,e,c,f));var D=a.f[p];D&ea&&(e=m(d,{name:p,next:e,c:D},b,f,U,c))}else{var u=d,x=b,z=f,y=U,H=c,G=n(u,e);G?(x.w&&x.w(G.name,G.R,z,y,k(x,u,G.next,H,z)),
+e=G.c&ea?m(u,G,x,z,y,H):G.next):e=u.length}else b.e&&b.e("&lt;",f,U,k(b,d,e,c,f));break;case "\x3c!--":if(!c.C){for(l=e+1;l<q&&(">"!==d[l]||!/--$/.test(d[l-1]));l++);if(l<q){if(b.A){var F=d.slice(e,l).join("");b.A(F.substr(0,F.length-2),f,U,k(b,d,l+1,c,f))}e=l+1}else c.C=!0}c.C&&b.e&&b.e("&lt;!--",f,U,k(b,d,e,c,f));break;case "<!":if(/^\w/.test(v)){if(!c.r){for(l=e+1;l<q&&">"!==d[l];l++);l<q?e=l+1:c.r=!0}c.r&&b.e&&b.e("&lt;!",f,U,k(b,d,e,c,f))}else b.e&&b.e("&lt;!",f,U,k(b,d,e,c,f));break;case "<?":if(!c.r){for(l=
+e+1;l<q&&">"!==d[l];l++);l<q?e=l+1:c.r=!0}c.r&&b.e&&b.e("&lt;?",f,U,k(b,d,e,c,f));break;case ">":b.e&&b.e("&gt;",f,U,k(b,d,e,c,f));break;case "":break;default:b.e&&b.e(t,f,U,k(b,d,e,c,f))}}b.B&&b.B(f)}catch(ga){if(ga!==U)throw ga;}}function m(b,d,e,c,g,l){var m=b.length;aa.hasOwnProperty(d.name)||(aa[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=aa[d.name],p=d.next,q=d.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(d.c&a.c.CDATA)e.z&&e.z(m,c,g,k(e,
+b,q,l,c));else if(d.c&a.c.RCDATA)e.F&&e.F(f(m),c,g,k(e,b,q,l,c));else throw Error("bug");return q}function n(b,e){var c=/^([-\w:]+)/.exec(b[e]),f={};f.name=c[1].toLowerCase();f.c=a.f[f.name];for(var g=b[e].substr(c[0].length),k=e+1,l=b.length;k<l&&">"!==b[k];k++)g+=b[k];if(!(l<=k)){for(var m=[];""!==g;)if(c=T.exec(g))if(c[4]&&!c[5]||c[6]&&!c[7]){for(var c=c[4]||c[6],n=!1,g=[g,b[k++]];k<l;k++){if(n){if(">"===b[k])break}else 0<=b[k].indexOf(c)&&(n=!0);g.push(b[k])}if(l<=k)break;g=g.join("")}else{var n=
+c[1].toLowerCase(),p;if(c[2]){p=c[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=d(p.replace(ca,""))}else p="";m.push(n,p);g=g.substr(c[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=k+1;return f}}function p(b){function d(a,b){f||b.push(a)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(d,g,k){if(!f&&a.f.hasOwnProperty(d)){var l=a.f[d];if(!(l&a.c.FOLDABLE)){var m=b(d,g);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
if("attribs"in m)g=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=a.f[n]):(n=d,m=l);if(l&a.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===d&&(p.v!==n||d!==n)&&k.push("</",p.v,">")}l&a.c.EMPTY||e.push({D:d,v:n});k.push("<",n);d=0;for(p=g.length;d<p;d+=2){var q=g[d],t=g[d+1];null!==t&&void 0!==t&&k.push(" ",q,'="',c(t),'"')}k.push(">");l&a.c.EMPTY&&!(m&a.c.EMPTY)&&k.push("</",n,">")}else f=!(l&a.c.EMPTY)}}},endTag:function(b,d){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var c=
a.f[b];if(!(c&(a.c.EMPTY|a.c.FOLDABLE))){if(c&a.c.OPTIONAL_ENDTAG)for(c=e.length;0<=--c;){var g=e[c].D;if(g===b)break;if(!(a.f[g]&a.c.OPTIONAL_ENDTAG))return}else for(c=e.length;0<=--c&&e[c].D!==b;);if(!(0>c)){for(g=e.length;--g>c;){var k=e[g].v;a.f[k]&a.c.OPTIONAL_ENDTAG||d.push("</",k,">")}c<e.length&&(b=e[c].v);e.length=c;d.push("</",b,">")}}}},pcdata:d,rcdata:d,cdata:d,endDoc:function(a){for(;e.length;e.length--)a.push("</",e[e.length-1].v,">")}})}function q(a,b,d,c,f){if(!f)return null;try{var g=
e.parse(""+a);if(g&&(!g.K()||ha.test(g.W()))){var k=f(g,b,d,c);return k?k.toString():null}}catch(na){}return null}function t(a,b,d,e,c){d||a(b+" removed",{S:"removed",tagName:b});if(e!==c){var f="changed";e&&!c?f="removed":!e&&c&&(f="added");a(b+"."+d+" "+f,{S:f,tagName:b,la:d,oldValue:e,newValue:c})}}function H(a,b,d){b=b+"::"+d;if(a.hasOwnProperty(b))return a[b];b="*::"+d;if(a.hasOwnProperty(b))return a[b]}function J(b,d,e,c,f){for(var g=0;g<d.length;g+=2){var k=d[g],l=d[g+1],m=l,n=null,p;if((p=
b+"::"+k,a.m.hasOwnProperty(p))||(p="*::"+k,a.m.hasOwnProperty(p)))n=a.m[p];if(null!==n)switch(n){case a.d.NONE:break;case a.d.SCRIPT:l=null;f&&t(f,b,k,m,l);break;case a.d.STYLE:if("undefined"===typeof M){l=null;f&&t(f,b,k,m,l);break}var v=[];M(l,{declaration:function(b,d){var c=b.toLowerCase();Q(c,d,e?function(b){return q(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:c},e)}:null);d.length&&v.push(c+": "+d.join(" "))}});l=0<v.length?v.join(" ; "):null;f&&t(f,b,k,m,l);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:l=
c?c(l):l;f&&t(f,b,k,m,l);break;case a.d.URI:l=q(l,H(a.J,b,k),H(a.I,b,k),{TYPE:"MARKUP",XML_ATTR:k,XML_TAG:b},e);f&&t(f,b,k,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=c?c(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&t(f,b,k,m,l);break;default:l=null,f&&t(f,b,k,m,l)}else l=null,f&&t(f,b,k,m,l);d[g+1]=l}return d}function I(b,d,e){return function(c,f){if(a.f[c]&a.c.UNSAFE)e&&t(e,c,void 0,void 0,void 0);else return{attribs:J(c,f,b,d,e)}}}function L(a,b){var d=[];p(b)(a,
-d);return d.join("")}var M,Q;"undefined"!==typeof window&&(M=window.parseCssDeclarations,Q=window.sanitizeCssProperty);var W={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},O=/^#(\d+)$/,G=/^#x([0-9A-Fa-f]+)$/,X=/^[A-Za-z][A-za-z0-9]+$/,N="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,da=/\0/g,Y=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,R=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,P=/&/g,S=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,V=
-/[<]/g,ea=/>/g,ba=/\"/g,T=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,aa=3==="a,b".split(/(,)/).length,ca=a.c.CDATA|a.c.RCDATA,U={},Z={},ha=/^(?:https?|mailto|data)$/i,fa={};fa.pa=fa.escapeAttrib=c;fa.ra=fa.makeHtmlSanitizer=p;fa.sa=fa.makeSaxParser=g;fa.ta=fa.makeTagPolicy=I;fa.wa=fa.normalizeRCData=f;fa.xa=fa.sanitize=function(a,b,d,e){return L(a,I(b,d,e))};fa.ya=fa.sanitizeAttribs=J;fa.za=fa.sanitizeWithPolicy=L;fa.Ba=fa.unescapeEntities=d;return fa}(q);
+d);return d.join("")}var M,Q;"undefined"!==typeof window&&(M=window.parseCssDeclarations,Q=window.sanitizeCssProperty);var X={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},N=/^#(\d+)$/,G=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,O="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,ca=/\0/g,Y=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,S=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,P=/&/g,R=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,V=
+/[<]/g,da=/>/g,Z=/\"/g,T=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ba=3==="a,b".split(/(,)/).length,ea=a.c.CDATA|a.c.RCDATA,U={},aa={},ha=/^(?:https?|mailto|data)$/i,fa={};fa.pa=fa.escapeAttrib=c;fa.ra=fa.makeHtmlSanitizer=p;fa.sa=fa.makeSaxParser=g;fa.ta=fa.makeTagPolicy=I;fa.wa=fa.normalizeRCData=f;fa.xa=fa.sanitize=function(a,b,d,e){return L(a,I(b,d,e))};fa.ya=fa.sanitizeAttribs=J;fa.za=fa.sanitizeWithPolicy=L;fa.Ba=fa.unescapeEntities=d;return fa}(q);
f=a.sanitize;"undefined"!==typeof window&&(window.html=a,window.html_sanitize=f)})();!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 c(f,d,b){function e(k,m){if(!d[k]){if(!f[k]){var l="function"==typeof require&&require;if(!m&&l)return l(k,!0);if(g)return g(k,!0);l=Error("Cannot find module '"+k+"'");throw l.code="MODULE_NOT_FOUND",l;}l=d[k]={exports:{}};
f[k][0].call(l.exports,function(b){var d=f[k][1][b];return e(d?d:b)},l,l.exports,c,f,d,b)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<b.length;k++)e(b[k]);return e}({1:[function(c,f,d){function b(d){if(!(this instanceof b))return new b(d);d=this.options=k.assign({level:t,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},d||{});d.raw&&0<d.windowBits?d.windowBits=-d.windowBits:d.gzip&&0<d.windowBits&&16>d.windowBits&&(d.windowBits+=16);this.err=0;this.msg=
"";this.ended=!1;this.chunks=[];this.strm=new n;this.strm.avail_out=0;var e=g.deflateInit2(this.strm,d.level,d.method,d.windowBits,d.memLevel,d.strategy);if(e!==q)throw Error(m[e]);if(d.header&&g.deflateSetHeader(this.strm,d.header),d.dictionary){var c;if(c="string"==typeof d.dictionary?l.string2buf(d.dictionary):"[object ArrayBuffer]"===p.call(d.dictionary)?new Uint8Array(d.dictionary):d.dictionary,e=g.deflateSetDictionary(this.strm,c),e!==q)throw Error(m[e]);this._dict_set=!0}}function e(d,e){var c=
@@ -112,77 +112,77 @@ new e.Buf8(256);for(c=0;256>c;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=
c?(d[k++]=192|c>>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6&63,d[k++]=128|63&c):(d[k++]=240|c>>>18,d[k++]=128|c>>>12&63,d[k++]=128|c>>>6&63,d[k++]=128|63&c);return d};d.buf2binstring=function(d){return b(d,d.length)};d.binstring2buf=function(b){for(var d=new e.Buf8(b.length),c=0,f=d.length;c<f;c++)d[c]=b.charCodeAt(c);return d};d.buf2string=function(d,e){var c,f,g,k,m=e||d.length,n=Array(2*m);for(c=f=0;c<m;)if(g=d[c++],128>g)n[f++]=g;else if(k=l[g],4<k)n[f++]=65533,c+=k-1;else{for(g&=
2===k?31:3===k?15:7;1<k&&c<m;)g=g<<6|63&d[c++],k--;1<k?n[f++]=65533:65536>g?n[f++]=g:(g-=65536,n[f++]=55296|g>>10&1023,n[f++]=56320|1023&g)}return b(n,f)};d.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+l[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var e=65535&b|0;b=b>>>16&65535|0;for(var g;0!==c;){g=2E3<c?2E3:c;c-=g;do e=e+d[f++]|0,b=b+e|0;while(--g);e%=65521;b%=65521}return e|b<<
16|0}},{}],6:[function(c,f,d){f.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(c,f,d){var b=function(){for(var b,d=[],c=0;256>c;c++){b=c;for(var f=
-0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=D[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(z.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=0))}
-function k(b,d){C._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function m(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function n(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-V?b.strstart-(b.w_size-V):0,n=b.window,p=b.w_mask,q=b.prev,t=b.strstart+S,v=n[g+k-1],u=n[g+k];b.prev_length>=b.good_match&&(f>>=
-2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===u&&n[e+k-1]===v&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;for(e++;n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&g<t;);if(c=S-(t-g),g=t-S,c>k){if(b.match_start=d,k=c,c>=l)break;v=n[g+k-1];u=n[g+k]}}while((d=q[d&p])>m&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=g+(g-V)){z.arraySet(b.window,
-b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,z.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=E(d.adler,c,l,k):2===d.state.wrap&&(d.adler=F(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),b.lookahead+=e,b.lookahead+
+0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=D[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(A.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=0))}
+function k(b,d){C._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function m(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function n(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-V?b.strstart-(b.w_size-V):0,n=b.window,p=b.w_mask,q=b.prev,t=b.strstart+R,v=n[g+k-1],u=n[g+k];b.prev_length>=b.good_match&&(f>>=
+2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===u&&n[e+k-1]===v&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;for(e++;n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&g<t;);if(c=R-(t-g),g=t-R,c>k){if(b.match_start=d,k=c,c>=l)break;v=n[g+k-1];u=n[g+k]}}while((d=q[d&p])>m&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=g+(g-V)){A.arraySet(b.window,
+b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,A.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=E(d.adler,c,l,k):2===d.state.wrap&&(d.adler=F(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),b.lookahead+=e,b.lookahead+
b.insert>=P)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+P-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<P)););}while(b.lookahead<V&&0!==b.strm.avail_in)}function q(b,d){for(var e,c;;){if(b.lookahead<V){if(p(b),b.lookahead<V&&d===K)return T;if(0===b.lookahead)break}if(e=0,b.lookahead>=P&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
P-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-V&&(b.match_length=n(b,e)),b.match_length>=P)if(c=C._tr_tally(b,b.strstart-b.match_start,b.match_length-P),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=P){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+P-1])&b.hash_mask,e=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 c=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=b.strstart<P-1?b.strstart:P-1,d===H?(k(b,!0),0===b.strm.avail_out?ca:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:aa}function t(b,d){for(var e,c,f;;){if(b.lookahead<V){if(p(b),b.lookahead<V&&d===K)return T;
+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 c=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=b.strstart<P-1?b.strstart:P-1,d===H?(k(b,!0),0===b.strm.avail_out?ea:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:ba}function t(b,d){for(var e,c,f;;){if(b.lookahead<V){if(p(b),b.lookahead<V&&d===K)return T;
if(0===b.lookahead)break}if(e=0,b.lookahead>=P&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+P-1])&b.hash_mask,e=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=P-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-V&&(b.match_length=n(b,e),5>=b.match_length&&(b.strategy===M||b.match_length===P&&4096<b.strstart-b.match_start)&&(b.match_length=P-1)),b.prev_length>=P&&b.match_length<=b.prev_length){f=
b.strstart+b.lookahead-P;c=C._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-P);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+P-1])&b.hash_mask,e=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=P-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return T}else if(b.match_available){if(c=C._tr_tally(b,0,b.window[b.strstart-1]),c&&k(b,!1),
-b.strstart++,b.lookahead--,0===b.strm.avail_out)return T}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(C._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<P-1?b.strstart:P-1,d===H?(k(b,!0),0===b.strm.avail_out?ca:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:aa}function u(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function v(){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=O;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 z.Buf16(2*Y);this.dyn_dtree=new z.Buf16(2*(2*N+1));this.bl_tree=new z.Buf16(2*(2*da+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new z.Buf16(R+1);this.heap=new z.Buf16(2*X+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new z.Buf16(2*X+1);e(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 x(d){var e;
-return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:ba,d.adler=2===e.wrap?0:1,e.last_flush=K,C._tr_init(e),J):b(d,I)}function y(b){var d=x(b);d===J&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=B[b.level].max_lazy,b.good_match=B[b.level].good_length,b.nice_match=B[b.level].nice_length,b.max_chain_length=B[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
-b.prev_length=P-1,b.match_available=0,b.ins_h=0);return d}function A(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>G||c!==O||8>f||15<f||0>e||9<e||0>k||k>Q)return b(d,I);8===f&&(f=9);var m=new v;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=g+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+P-1)/P),m.window=new z.Buf8(2*m.w_size),m.head=new z.Buf16(m.hash_size),
-m.prev=new z.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new z.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=e,m.strategy=k,m.method=c,y(d)}var B,z=c("../utils/common"),C=c("./trees"),E=c("./adler32"),F=c("./crc32"),D=c("./messages"),K=0,H=4,J=0,I=-2,L=-1,M=1,Q=4,W=2,O=8,G=9,X=286,N=30,da=19,Y=2*X+1,R=15,P=3,S=258,V=S+P+1,ea=42,ba=113,T=1,aa=2,ca=3,U=4;B=[new u(0,0,0,0,function(b,d){var e=65535;for(e>b.pending_buf_size-5&&
-(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===K)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-V&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===H?(k(b,!0),0===b.strm.avail_out?ca:U):(b.strstart>b.block_start&&k(b,!1),T)}),new u(4,4,8,4,q),new u(4,5,16,8,q),new u(4,6,
-32,32,q),new u(4,4,16,16,t),new u(8,16,32,32,t),new u(8,16,128,128,t),new u(8,32,128,256,t),new u(32,128,258,1024,t),new u(32,258,258,4096,t)];d.deflateInit=function(b,d){return A(b,d,O,15,8,0)};d.deflateInit2=A;d.deflateReset=y;d.deflateResetKeep=x;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,J):I};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5<c||0>c)return d?b(d,I):I;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||666===n.status&&c!==H)return b(d,
-0===d.avail_out?-5:I);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===ea)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
-8&255)),n.gzhead.hcrc&&(d.adler=F(d.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(q=O+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ba,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,d.adler>>>16),m(n,65535&d.adler)),d.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
+b.strstart++,b.lookahead--,0===b.strm.avail_out)return T}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(C._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<P-1?b.strstart:P-1,d===H?(k(b,!0),0===b.strm.avail_out?ea:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:ba}function u(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function v(){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=N;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 A.Buf16(2*Y);this.dyn_dtree=new A.Buf16(2*(2*O+1));this.bl_tree=new A.Buf16(2*(2*ca+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new A.Buf16(S+1);this.heap=new A.Buf16(2*W+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new A.Buf16(2*W+1);e(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 x(d){var e;
+return d&&d.state?(d.total_in=d.total_out=0,d.data_type=X,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:Z,d.adler=2===e.wrap?0:1,e.last_flush=K,C._tr_init(e),J):b(d,I)}function z(b){var d=x(b);d===J&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=B[b.level].max_lazy,b.good_match=B[b.level].good_length,b.nice_match=B[b.level].nice_length,b.max_chain_length=B[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
+b.prev_length=P-1,b.match_available=0,b.ins_h=0);return d}function y(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>G||c!==N||8>f||15<f||0>e||9<e||0>k||k>Q)return b(d,I);8===f&&(f=9);var m=new v;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=g+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+P-1)/P),m.window=new A.Buf8(2*m.w_size),m.head=new A.Buf16(m.hash_size),
+m.prev=new A.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new A.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=e,m.strategy=k,m.method=c,z(d)}var B,A=c("../utils/common"),C=c("./trees"),E=c("./adler32"),F=c("./crc32"),D=c("./messages"),K=0,H=4,J=0,I=-2,L=-1,M=1,Q=4,X=2,N=8,G=9,W=286,O=30,ca=19,Y=2*W+1,S=15,P=3,R=258,V=R+P+1,da=42,Z=113,T=1,ba=2,ea=3,U=4;B=[new u(0,0,0,0,function(b,d){var e=65535;for(e>b.pending_buf_size-5&&
+(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===K)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-V&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===H?(k(b,!0),0===b.strm.avail_out?ea:U):(b.strstart>b.block_start&&k(b,!1),T)}),new u(4,4,8,4,q),new u(4,5,16,8,q),new u(4,6,
+32,32,q),new u(4,4,16,16,t),new u(8,16,32,32,t),new u(8,16,128,128,t),new u(8,32,128,256,t),new u(32,128,258,1024,t),new u(32,258,258,4096,t)];d.deflateInit=function(b,d){return y(b,d,N,15,8,0)};d.deflateInit2=y;d.deflateReset=z;d.deflateResetKeep=x;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,J):I};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5<c||0>c)return d?b(d,I):I;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||666===n.status&&c!==H)return b(d,
+0===d.avail_out?-5:I);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
+8&255)),n.gzhead.hcrc&&(d.adler=F(d.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=Z)):(q=N+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=Z,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,d.adler>>>16),m(n,65535&d.adler)),d.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-
q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){t=
-1;break}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(d),n.pending+2<=n.pending_buf_size&&(l(n,255&d.adler),l(n,d.adler>>8&255),d.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=-1,J}else if(0===d.avail_in&&(c<<1)-
-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==H)return b(d,-5);if(666===n.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==n.lookahead||c!==K&&666!==n.status){var v;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===K){v=T;break a}break}if(n.match_length=0,u=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){v=T;break a}}v=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ca:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
-T:aa)}else if(3===n.strategy)a:{var x,y;for(u=n.window;;){if(n.lookahead<=S){if(p(n),n.lookahead<=S&&c===K){v=T;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=P&&0<n.strstart&&(y=n.strstart-1,x=u[y],x===u[++y]&&x===u[++y]&&x===u[++y])){for(f=n.strstart+S;x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&y<f;);n.match_length=S-(f-y);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=P?(v=C._tr_tally(n,1,n.match_length-
-P),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(v=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),v&&(k(n,!1),0===n.strm.avail_out)){v=T;break a}}v=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ca:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:aa)}else v=B[n.level].func(n,c);if(v!==ca&&v!==U||(n.status=666),v===T||v===ca)return 0===d.avail_out&&(n.last_flush=-1),J;if(v===aa&&(1===c?C._tr_align(n):5!==c&&(C._tr_stored_block(n,0,0,!1),3===c&&(e(n.head),
-0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,J}return c!==H?J:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?J:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,e!==ea&&69!==e&&73!==e&&
-91!==e&&103!==e&&e!==ba&&666!==e?b(d,I):(d.state=null,e===ba?b(d,-3):J)):I};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,m,n;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==ea||c.lookahead))return I;1===k&&(b.adler=E(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new z.Buf8(c.w_size),z.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=0;b.input=d;for(p(c);c.lookahead>=
+1;break}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(d),n.pending+2<=n.pending_buf_size&&(l(n,255&d.adler),l(n,d.adler>>8&255),d.adler=0,n.status=Z)):n.status=Z),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=-1,J}else if(0===d.avail_in&&(c<<1)-
+(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==H)return b(d,-5);if(666===n.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==n.lookahead||c!==K&&666!==n.status){var v;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===K){v=T;break a}break}if(n.match_length=0,u=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){v=T;break a}}v=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ea:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
+T:ba)}else if(3===n.strategy)a:{var x,z;for(u=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===K){v=T;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=P&&0<n.strstart&&(z=n.strstart-1,x=u[z],x===u[++z]&&x===u[++z]&&x===u[++z])){for(f=n.strstart+R;x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&z<f;);n.match_length=R-(f-z);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=P?(v=C._tr_tally(n,1,n.match_length-
+P),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(v=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),v&&(k(n,!1),0===n.strm.avail_out)){v=T;break a}}v=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ea:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:ba)}else v=B[n.level].func(n,c);if(v!==ea&&v!==U||(n.status=666),v===T||v===ea)return 0===d.avail_out&&(n.last_flush=-1),J;if(v===ba&&(1===c?C._tr_align(n):5!==c&&(C._tr_stored_block(n,0,0,!1),3===c&&(e(n.head),
+0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,J}return c!==H?J:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?J:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,e!==da&&69!==e&&73!==e&&
+91!==e&&103!==e&&e!==Z&&666!==e?b(d,I):(d.state=null,e===Z?b(d,-3):J)):I};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,m,n;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==da||c.lookahead))return I;1===k&&(b.adler=E(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new A.Buf8(c.w_size),A.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=0;b.input=d;for(p(c);c.lookahead>=
P;){f=c.strstart;g=c.lookahead-(P-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+P-1])&c.hash_mask,c.prev[f&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=f,f++;while(--g);c.strstart=f;c.lookahead=P-1;p(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=P-1,c.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,c.wrap=k,J};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
-"./trees":14}],9:[function(c,f,d){f.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(c,f,d){f.exports=function(b,d){var e,c,f,m,n,p,q,t,u,v,x,y,A,B,z,C,E,F,D,K,H,J,I,L;e=b.state;c=b.next_in;I=b.input;f=c+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);q=e.dmax;t=e.wsize;u=e.whave;v=e.wnext;x=e.window;y=e.hold;A=e.bits;B=e.lencode;z=e.distcode;C=(1<<e.lenbits)-
-1;E=(1<<e.distbits)-1;a:do b:for(15>A&&(y+=I[c++]<<A,A+=8,y+=I[c++]<<A,A+=8),F=B[y&C];;){if(D=F>>>24,y>>>=D,A-=D,D=F>>>16&255,0===D)L[m++]=65535&F;else{if(!(16&D)){if(0===(64&D)){F=B[(65535&F)+(y&(1<<D)-1)];continue b}if(32&D){e.mode=12;break a}b.msg="invalid literal/length code";e.mode=30;break a}K=65535&F;(D&=15)&&(A<D&&(y+=I[c++]<<A,A+=8),K+=y&(1<<D)-1,y>>>=D,A-=D);15>A&&(y+=I[c++]<<A,A+=8,y+=I[c++]<<A,A+=8);F=z[y&E];c:for(;;){if(D=F>>>24,y>>>=D,A-=D,D=F>>>16&255,!(16&D)){if(0===(64&D)){F=z[(65535&
-F)+(y&(1<<D)-1)];continue c}b.msg="invalid distance code";e.mode=30;break a}if(H=65535&F,D&=15,A<D&&(y+=I[c++]<<A,A+=8,A<D&&(y+=I[c++]<<A,A+=8)),H+=y&(1<<D)-1,H>q){b.msg="invalid distance too far back";e.mode=30;break a}if(y>>>=D,A-=D,D=m-n,H>D){if(D=H-D,D>u&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}if(F=0,J=x,0===v){if(F+=t-D,D<K){K-=D;do L[m++]=x[F++];while(--D);F=m-H;J=L}}else if(v<D){if(F+=t+v-D,D-=v,D<K){K-=D;do L[m++]=x[F++];while(--D);if(F=0,v<K){D=v;K-=D;do L[m++]=x[F++];
-while(--D);F=m-H;J=L}}}else if(F+=v-D,D<K){K-=D;do L[m++]=x[F++];while(--D);F=m-H;J=L}for(;2<K;)L[m++]=J[F++],L[m++]=J[F++],L[m++]=J[F++],K-=3;K&&(L[m++]=J[F++],1<K&&(L[m++]=J[F++]))}else{F=m-H;do L[m++]=L[F++],L[m++]=L[F++],L[m++]=L[F++],K-=3;while(2<K);K&&(L[m++]=L[F++],1<K&&(L[m++]=L[F++]))}break}}break}while(c<f&&m<p);K=A>>3;c-=K;A-=K<<3;b.next_in=c;b.next_out=m;b.avail_in=c<f?5+(f-c):5-(c-f);b.avail_out=m<p?257+(p-m):257-(m-p);e.hold=y&(1<<A)-1;e.bits=A}},{}],11:[function(c,f,d){function b(b){return(b>>>
+"./trees":14}],9:[function(c,f,d){f.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(c,f,d){f.exports=function(b,d){var e,c,f,m,n,p,q,t,u,v,x,z,y,B,A,C,E,F,D,K,H,J,I,L;e=b.state;c=b.next_in;I=b.input;f=c+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);q=e.dmax;t=e.wsize;u=e.whave;v=e.wnext;x=e.window;z=e.hold;y=e.bits;B=e.lencode;A=e.distcode;C=(1<<e.lenbits)-
+1;E=(1<<e.distbits)-1;a:do b:for(15>y&&(z+=I[c++]<<y,y+=8,z+=I[c++]<<y,y+=8),F=B[z&C];;){if(D=F>>>24,z>>>=D,y-=D,D=F>>>16&255,0===D)L[m++]=65535&F;else{if(!(16&D)){if(0===(64&D)){F=B[(65535&F)+(z&(1<<D)-1)];continue b}if(32&D){e.mode=12;break a}b.msg="invalid literal/length code";e.mode=30;break a}K=65535&F;(D&=15)&&(y<D&&(z+=I[c++]<<y,y+=8),K+=z&(1<<D)-1,z>>>=D,y-=D);15>y&&(z+=I[c++]<<y,y+=8,z+=I[c++]<<y,y+=8);F=A[z&E];c:for(;;){if(D=F>>>24,z>>>=D,y-=D,D=F>>>16&255,!(16&D)){if(0===(64&D)){F=A[(65535&
+F)+(z&(1<<D)-1)];continue c}b.msg="invalid distance code";e.mode=30;break a}if(H=65535&F,D&=15,y<D&&(z+=I[c++]<<y,y+=8,y<D&&(z+=I[c++]<<y,y+=8)),H+=z&(1<<D)-1,H>q){b.msg="invalid distance too far back";e.mode=30;break a}if(z>>>=D,y-=D,D=m-n,H>D){if(D=H-D,D>u&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}if(F=0,J=x,0===v){if(F+=t-D,D<K){K-=D;do L[m++]=x[F++];while(--D);F=m-H;J=L}}else if(v<D){if(F+=t+v-D,D-=v,D<K){K-=D;do L[m++]=x[F++];while(--D);if(F=0,v<K){D=v;K-=D;do L[m++]=x[F++];
+while(--D);F=m-H;J=L}}}else if(F+=v-D,D<K){K-=D;do L[m++]=x[F++];while(--D);F=m-H;J=L}for(;2<K;)L[m++]=J[F++],L[m++]=J[F++],L[m++]=J[F++],K-=3;K&&(L[m++]=J[F++],1<K&&(L[m++]=J[F++]))}else{F=m-H;do L[m++]=L[F++],L[m++]=L[F++],L[m++]=L[F++],K-=3;while(2<K);K&&(L[m++]=L[F++],1<K&&(L[m++]=L[F++]))}break}}break}while(c<f&&m<p);K=y>>3;c-=K;y-=K<<3;b.next_in=c;b.next_out=m;b.avail_in=c<f?5+(f-c):5-(c-f);b.avail_out=m<p?257+(p-m):257-(m-p);e.hold=z&(1<<y)-1;e.bits=y}},{}],11:[function(c,f,d){function b(b){return(b>>>
24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){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 t.Buf16(320);this.work=new t.Buf16(288);this.distdyn=this.lendyn=null;this.was=
-this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=z,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new t.Buf32(C),d.distcode=d.distdyn=new t.Buf32(E),d.sane=1,d.back=-1,A):B}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):B}function l(b,d){var e,c;return b&&b.state?(c=b.state,0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<
-d)?B:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):B}function m(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==A&&(b.state=null),c):B}function n(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new t.Buf8(b.wsize)),c>=b.wsize?(t.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),t.arraySet(b.window,d,e-c,f,b.wnext),c-=f,c?(t.arraySet(b.window,d,e-c,c,0),b.wnext=
-c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,q,t=c("../utils/common"),u=c("./adler32"),v=c("./crc32"),x=c("./inffast"),y=c("./inftrees"),A=0,B=-2,z=1,C=852,E=592,F=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(d,e){var c,f,g,k,l,m,D,C,G,K,N,E,Y,R,P,S,V,ea,ba,T,aa,ca,U=0,Z=new t.Buf8(4),ha=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||
-!d.output||!d.input&&0!==d.avail_in)return B;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;K=m;N=D;aa=A;a:for(;;)switch(c.mode){case z:if(0===c.wrap){c.mode=13;break}for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(2&c.wrap&&35615===C){c.check=0;Z[0]=255&C;Z[1]=C>>>8&255;c.check=v(c.check,Z,2,0);G=C=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&C)<<8)+(C>>8))%31){d.msg="incorrect header check";
+this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=A,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new t.Buf32(C),d.distcode=d.distdyn=new t.Buf32(E),d.sane=1,d.back=-1,y):B}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):B}function l(b,d){var e,c;return b&&b.state?(c=b.state,0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<
+d)?B:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):B}function m(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==y&&(b.state=null),c):B}function n(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new t.Buf8(b.wsize)),c>=b.wsize?(t.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),t.arraySet(b.window,d,e-c,f,b.wnext),c-=f,c?(t.arraySet(b.window,d,e-c,c,0),b.wnext=
+c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,q,t=c("../utils/common"),u=c("./adler32"),v=c("./crc32"),x=c("./inffast"),z=c("./inftrees"),y=0,B=-2,A=1,C=852,E=592,F=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(d,e){var c,f,g,k,l,m,D,C,G,K,O,E,Y,S,P,R,V,da,Z,T,ba,ea,U=0,aa=new t.Buf8(4),ha=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||
+!d.output||!d.input&&0!==d.avail_in)return B;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;K=m;O=D;ba=y;a:for(;;)switch(c.mode){case A:if(0===c.wrap){c.mode=13;break}for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(2&c.wrap&&35615===C){c.check=0;aa[0]=255&C;aa[1]=C>>>8&255;c.check=v(c.check,aa,2,0);G=C=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&C)<<8)+(C>>8))%31){d.msg="incorrect header check";
c.mode=30;break}if(8!==(15&C)){d.msg="unknown compression method";c.mode=30;break}if(C>>>=4,G-=4,T=(15&C)+8,0===c.wbits)c.wbits=T;else if(T>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<T;d.adler=c.check=1;c.mode=512&C?10:12;G=C=0;break;case 2:for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.flags=C,8!==(255&c.flags)){d.msg="unknown compression method";c.mode=30;break}if(57344&c.flags){d.msg="unknown header flags set";c.mode=30;break}c.head&&(c.head.text=C>>8&1);512&c.flags&&
-(Z[0]=255&C,Z[1]=C>>>8&255,c.check=v(c.check,Z,2,0));G=C=0;c.mode=3;case 3:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.time=C);512&c.flags&&(Z[0]=255&C,Z[1]=C>>>8&255,Z[2]=C>>>16&255,Z[3]=C>>>24&255,c.check=v(c.check,Z,4,0));G=C=0;c.mode=4;case 4:for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.xflags=255&C,c.head.os=C>>8);512&c.flags&&(Z[0]=255&C,Z[1]=C>>>8&255,c.check=v(c.check,Z,2,0));G=C=0;c.mode=5;case 5:if(1024&c.flags){for(;16>G;){if(0===m)break a;m--;
-C+=f[k++]<<G;G+=8}c.length=C;c.head&&(c.head.extra_len=C);512&c.flags&&(Z[0]=255&C,Z[1]=C>>>8&255,c.check=v(c.check,Z,2,0));G=C=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(E=c.length,E>m&&(E=m),E&&(c.head&&(T=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),t.arraySet(c.head.extra,f,k,E,T)),512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,c.length-=E),c.length))break a;c.length=0;c.mode=7;case 7:if(2048&c.flags){if(0===m)break a;E=0;do T=f[k+
-E++],c.head&&T&&65536>c.length&&(c.head.name+=String.fromCharCode(T));while(T&&E<m);if(512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,T)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===m)break a;E=0;do T=f[k+E++],c.head&&T&&65536>c.length&&(c.head.comment+=String.fromCharCode(T));while(T&&E<m);if(512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,T)break a}else c.head&&(c.head.comment=null);c.mode=9;case 9:if(512&c.flags){for(;16>G;){if(0===m)break a;m--;
-C+=f[k++]<<G;G+=8}if(C!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}G=C=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}d.adler=c.check=b(C);G=C=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){C>>>=7&G;G-=7&G;c.mode=27;break}for(;3>G;){if(0===
-m)break a;m--;C+=f[k++]<<G;G+=8}switch(c.last=1&C,C>>>=1,--G,3&C){case 0:c.mode=14;break;case 1:S=c;if(F){p=new t.Buf32(512);q=new t.Buf32(32);for(R=0;144>R;)S.lens[R++]=8;for(;256>R;)S.lens[R++]=9;for(;280>R;)S.lens[R++]=7;for(;288>R;)S.lens[R++]=8;y(1,S.lens,0,288,p,0,S.work,{bits:9});for(R=0;32>R;)S.lens[R++]=5;y(2,S.lens,0,32,q,0,S.work,{bits:5});F=!1}S.lencode=p;S.lenbits=9;S.distcode=q;S.distbits=5;if(c.mode=20,6===e){C>>>=2;G-=2;break a}break;case 2:c.mode=17;break;case 3:d.msg="invalid block type",
-c.mode=30}C>>>=2;G-=2;break;case 14:C>>>=7&G;for(G-=7&G;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if((65535&C)!==(C>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&C,C=0,G=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(E=c.length){if(E>m&&(E=m),E>D&&(E=D),0===E)break a;t.arraySet(g,f,k,E,l);m-=E;k+=E;D-=E;l+=E;c.length-=E;break}c.mode=12;break;case 17:for(;14>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.nlen=(31&C)+257,C>>>=5,G-=5,c.ndist=(31&C)+
-1,C>>>=5,G-=5,c.ncode=(15&C)+4,C>>>=4,G-=4,286<c.nlen||30<c.ndist){d.msg="too many length or distance symbols";c.mode=30;break}c.have=0;c.mode=18;case 18:for(;c.have<c.ncode;){for(;3>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.lens[ha[c.have++]]=7&C;C>>>=3;G-=3}for(;19>c.have;)c.lens[ha[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ca={bits:c.lenbits},aa=y(0,c.lens,0,19,c.lencode,0,c.work,ca),c.lenbits=ca.bits,aa){d.msg="invalid code lengths set";c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have<
-c.nlen+c.ndist;){for(;U=c.lencode[C&(1<<c.lenbits)-1],P=U>>>24,S=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(16>S)C>>>=P,G-=P,c.lens[c.have++]=S;else{if(16===S){for(R=P+2;G<R;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C>>>=P,G-=P,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}T=c.lens[c.have-1];E=3+(3&C);C>>>=2;G-=2}else if(17===S){for(R=P+3;G<R;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=P;G-=P;T=0;E=3+(7&C);C>>>=3;G-=3}else{for(R=P+7;G<R;){if(0===m)break a;m--;
-C+=f[k++]<<G;G+=8}C>>>=P;G-=P;T=0;E=11+(127&C);C>>>=7;G-=7}if(c.have+E>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;E--;)c.lens[c.have++]=T}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,ca={bits:c.lenbits},aa=y(1,c.lens,0,c.nlen,c.lencode,0,c.work,ca),c.lenbits=ca.bits,aa){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,ca={bits:c.distbits},aa=y(2,c.lens,c.nlen,
-c.ndist,c.distcode,0,c.work,ca),c.distbits=ca.bits,aa){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=m&&258<=D){d.next_out=l;d.avail_out=D;d.next_in=k;d.avail_in=m;c.hold=C;c.bits=G;x(d,N);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;U=c.lencode[C&(1<<c.lenbits)-1],P=U>>>24,R=U>>>16&255,S=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(R&&
-0===(240&R)){V=P;ea=R;for(ba=S;U=c.lencode[ba+((C&(1<<V+ea)-1)>>V)],P=U>>>24,R=U>>>16&255,S=65535&U,!(V+P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=V;G-=V;c.back+=V}if(C>>>=P,G-=P,c.back+=P,c.length=S,0===R){c.mode=26;break}if(32&R){c.back=-1;c.mode=12;break}if(64&R){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&R;c.mode=22;case 22:if(c.extra){for(R=c.extra;G<R;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.length+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}c.was=
-c.length;c.mode=23;case 23:for(;U=c.distcode[C&(1<<c.distbits)-1],P=U>>>24,R=U>>>16&255,S=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(0===(240&R)){V=P;ea=R;for(ba=S;U=c.distcode[ba+((C&(1<<V+ea)-1)>>V)],P=U>>>24,R=U>>>16&255,S=65535&U,!(V+P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=V;G-=V;c.back+=V}if(C>>>=P,G-=P,c.back+=P,64&R){d.msg="invalid distance code";c.mode=30;break}c.offset=S;c.extra=15&R;c.mode=24;case 24:if(c.extra){for(R=c.extra;G<R;){if(0===m)break a;m--;C+=f[k++]<<
-G;G+=8}c.offset+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(E=N-D,c.offset>E){if(E=c.offset-E,E>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}E>c.wnext?(E-=c.wnext,Y=c.wsize-E):Y=c.wnext-E;E>c.length&&(E=c.length);R=c.window}else R=g,Y=l-c.offset,E=c.length;E>D&&(E=D);D-=E;c.length-=E;do g[l++]=R[Y++];while(--E);0===c.length&&(c.mode=21);break;case 26:if(0===
-D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>G;){if(0===m)break a;m--;C|=f[k++]<<G;G+=8}if(N-=D,d.total_out+=N,c.total+=N,N&&(d.adler=c.check=c.flags?v(c.check,g,N,l-N):u(c.check,g,N,l-N)),N=D,(c.flags?C:b(C))!==c.check){d.msg="incorrect data check";c.mode=30;break}G=C=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=30;break}G=C=0}c.mode=29;case 29:aa=1;break a;
-case 30:aa=-3;break a;case 31:return-4;default:return B}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,(c.wsize||N!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,N-d.avail_out)?(c.mode=31,-4):(K-=d.avail_in,N-=d.avail_out,d.total_in+=K,d.total_out+=N,c.total+=N,c.wrap&&N&&(d.adler=c.check=c.flags?v(c.check,g,N,d.next_out-N):u(c.check,g,N,d.next_out-N)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===c.mode?256:0),(0===K&&
-0===N||4===e)&&aa===A&&(aa=-5),aa)};d.inflateEnd=function(b){if(!b||!b.state)return B;var d=b.state;return d.window&&(d.window=null),b.state=null,A};d.inflateGetHeader=function(b,d){var c;return b&&b.state?(c=b.state,0===(2&c.wrap)?B:(c.head=d,d.done=!1,A)):B};d.inflateSetDictionary=function(b,d){var c,e,f=d.length;return b&&b.state?(c=b.state,0!==c.wrap&&11!==c.mode?B:11===c.mode&&(e=1,e=u(e,d,f,0),e!==c.check)?-3:n(b,d,f,f)?(c.mode=31,-4):(c.havedict=1,A)):B};d.inflateInfo="pako inflate (from Nodeca project)"},
+(aa[0]=255&C,aa[1]=C>>>8&255,c.check=v(c.check,aa,2,0));G=C=0;c.mode=3;case 3:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.time=C);512&c.flags&&(aa[0]=255&C,aa[1]=C>>>8&255,aa[2]=C>>>16&255,aa[3]=C>>>24&255,c.check=v(c.check,aa,4,0));G=C=0;c.mode=4;case 4:for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.xflags=255&C,c.head.os=C>>8);512&c.flags&&(aa[0]=255&C,aa[1]=C>>>8&255,c.check=v(c.check,aa,2,0));G=C=0;c.mode=5;case 5:if(1024&c.flags){for(;16>G;){if(0===
+m)break a;m--;C+=f[k++]<<G;G+=8}c.length=C;c.head&&(c.head.extra_len=C);512&c.flags&&(aa[0]=255&C,aa[1]=C>>>8&255,c.check=v(c.check,aa,2,0));G=C=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(E=c.length,E>m&&(E=m),E&&(c.head&&(T=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),t.arraySet(c.head.extra,f,k,E,T)),512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,c.length-=E),c.length))break a;c.length=0;c.mode=7;case 7:if(2048&c.flags){if(0===m)break a;
+E=0;do T=f[k+E++],c.head&&T&&65536>c.length&&(c.head.name+=String.fromCharCode(T));while(T&&E<m);if(512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,T)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===m)break a;E=0;do T=f[k+E++],c.head&&T&&65536>c.length&&(c.head.comment+=String.fromCharCode(T));while(T&&E<m);if(512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,T)break a}else c.head&&(c.head.comment=null);c.mode=9;case 9:if(512&c.flags){for(;16>G;){if(0===
+m)break a;m--;C+=f[k++]<<G;G+=8}if(C!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}G=C=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}d.adler=c.check=b(C);G=C=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){C>>>=7&G;G-=7&G;c.mode=27;break}for(;3>
+G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}switch(c.last=1&C,C>>>=1,--G,3&C){case 0:c.mode=14;break;case 1:R=c;if(F){p=new t.Buf32(512);q=new t.Buf32(32);for(S=0;144>S;)R.lens[S++]=8;for(;256>S;)R.lens[S++]=9;for(;280>S;)R.lens[S++]=7;for(;288>S;)R.lens[S++]=8;z(1,R.lens,0,288,p,0,R.work,{bits:9});for(S=0;32>S;)R.lens[S++]=5;z(2,R.lens,0,32,q,0,R.work,{bits:5});F=!1}R.lencode=p;R.lenbits=9;R.distcode=q;R.distbits=5;if(c.mode=20,6===e){C>>>=2;G-=2;break a}break;case 2:c.mode=17;break;case 3:d.msg=
+"invalid block type",c.mode=30}C>>>=2;G-=2;break;case 14:C>>>=7&G;for(G-=7&G;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if((65535&C)!==(C>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&C,C=0,G=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(E=c.length){if(E>m&&(E=m),E>D&&(E=D),0===E)break a;t.arraySet(g,f,k,E,l);m-=E;k+=E;D-=E;l+=E;c.length-=E;break}c.mode=12;break;case 17:for(;14>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.nlen=(31&C)+257,C>>>=5,
+G-=5,c.ndist=(31&C)+1,C>>>=5,G-=5,c.ncode=(15&C)+4,C>>>=4,G-=4,286<c.nlen||30<c.ndist){d.msg="too many length or distance symbols";c.mode=30;break}c.have=0;c.mode=18;case 18:for(;c.have<c.ncode;){for(;3>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.lens[ha[c.have++]]=7&C;C>>>=3;G-=3}for(;19>c.have;)c.lens[ha[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ea={bits:c.lenbits},ba=z(0,c.lens,0,19,c.lencode,0,c.work,ea),c.lenbits=ea.bits,ba){d.msg="invalid code lengths set";c.mode=30;break}c.have=0;c.mode=
+19;case 19:for(;c.have<c.nlen+c.ndist;){for(;U=c.lencode[C&(1<<c.lenbits)-1],P=U>>>24,R=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(16>R)C>>>=P,G-=P,c.lens[c.have++]=R;else{if(16===R){for(S=P+2;G<S;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C>>>=P,G-=P,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}T=c.lens[c.have-1];E=3+(3&C);C>>>=2;G-=2}else if(17===R){for(S=P+3;G<S;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=P;G-=P;T=0;E=3+(7&C);C>>>=3;G-=3}else{for(S=P+7;G<S;){if(0===
+m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=P;G-=P;T=0;E=11+(127&C);C>>>=7;G-=7}if(c.have+E>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;E--;)c.lens[c.have++]=T}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,ea={bits:c.lenbits},ba=z(1,c.lens,0,c.nlen,c.lencode,0,c.work,ea),c.lenbits=ea.bits,ba){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,ea={bits:c.distbits},ba=z(2,
+c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ea),c.distbits=ea.bits,ba){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=m&&258<=D){d.next_out=l;d.avail_out=D;d.next_in=k;d.avail_in=m;c.hold=C;c.bits=G;x(d,O);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;U=c.lencode[C&(1<<c.lenbits)-1],P=U>>>24,S=U>>>16&255,R=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<
+G;G+=8}if(S&&0===(240&S)){V=P;da=S;for(Z=R;U=c.lencode[Z+((C&(1<<V+da)-1)>>V)],P=U>>>24,S=U>>>16&255,R=65535&U,!(V+P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=V;G-=V;c.back+=V}if(C>>>=P,G-=P,c.back+=P,c.length=R,0===S){c.mode=26;break}if(32&S){c.back=-1;c.mode=12;break}if(64&S){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&S;c.mode=22;case 22:if(c.extra){for(S=c.extra;G<S;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.length+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}c.was=
+c.length;c.mode=23;case 23:for(;U=c.distcode[C&(1<<c.distbits)-1],P=U>>>24,S=U>>>16&255,R=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(0===(240&S)){V=P;da=S;for(Z=R;U=c.distcode[Z+((C&(1<<V+da)-1)>>V)],P=U>>>24,S=U>>>16&255,R=65535&U,!(V+P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=V;G-=V;c.back+=V}if(C>>>=P,G-=P,c.back+=P,64&S){d.msg="invalid distance code";c.mode=30;break}c.offset=R;c.extra=15&S;c.mode=24;case 24:if(c.extra){for(S=c.extra;G<S;){if(0===m)break a;m--;C+=f[k++]<<
+G;G+=8}c.offset+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(E=O-D,c.offset>E){if(E=c.offset-E,E>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}E>c.wnext?(E-=c.wnext,Y=c.wsize-E):Y=c.wnext-E;E>c.length&&(E=c.length);S=c.window}else S=g,Y=l-c.offset,E=c.length;E>D&&(E=D);D-=E;c.length-=E;do g[l++]=S[Y++];while(--E);0===c.length&&(c.mode=21);break;case 26:if(0===
+D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>G;){if(0===m)break a;m--;C|=f[k++]<<G;G+=8}if(O-=D,d.total_out+=O,c.total+=O,O&&(d.adler=c.check=c.flags?v(c.check,g,O,l-O):u(c.check,g,O,l-O)),O=D,(c.flags?C:b(C))!==c.check){d.msg="incorrect data check";c.mode=30;break}G=C=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=30;break}G=C=0}c.mode=29;case 29:ba=1;break a;
+case 30:ba=-3;break a;case 31:return-4;default:return B}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,(c.wsize||O!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,O-d.avail_out)?(c.mode=31,-4):(K-=d.avail_in,O-=d.avail_out,d.total_in+=K,d.total_out+=O,c.total+=O,c.wrap&&O&&(d.adler=c.check=c.flags?v(c.check,g,O,d.next_out-O):u(c.check,g,O,d.next_out-O)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===c.mode?256:0),(0===K&&
+0===O||4===e)&&ba===y&&(ba=-5),ba)};d.inflateEnd=function(b){if(!b||!b.state)return B;var d=b.state;return d.window&&(d.window=null),b.state=null,y};d.inflateGetHeader=function(b,d){var c;return b&&b.state?(c=b.state,0===(2&c.wrap)?B:(c.head=d,d.done=!1,y)):B};d.inflateSetDictionary=function(b,d){var c,e,f=d.length;return b&&b.state?(c=b.state,0!==c.wrap&&11!==c.mode?B:11===c.mode&&(e=1,e=u(e,d,f,0),e!==c.check)?-3:n(b,d,f,f)?(c.mode=31,-4):(c.havedict=1,y)):B};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[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],k=[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],l=[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];f.exports=function(d,c,f,q,t,u,v,x){var m,n,p,z,C,E,F,D,K=x.bits,H,J,I,L,M,Q,W=0,O,G=null,X=0,N=new b.Buf16(16);z=new b.Buf16(16);var da=null,Y=0;for(H=0;15>=H;H++)N[H]=0;for(J=0;J<q;J++)N[c[f+J]]++;L=K;for(I=15;1<=I&&0===N[I];I--);if(L>I&&(L=I),0===I)return t[u++]=20971520,t[u++]=20971520,x.bits=1,0;for(K=1;K<I&&0===N[K];K++);L<K&&(L=K);for(H=m=1;15>=H;H++)if(m<<=1,m-=N[H],0>m)return-1;if(0<m&&(0===d||1!==I))return-1;z[1]=0;for(H=1;15>H;H++)z[H+1]=z[H]+N[H];for(J=
-0;J<q;J++)0!==c[f+J]&&(v[z[c[f+J]]++]=J);if(0===d?(G=da=v,C=19):1===d?(G=e,X-=257,da=g,Y-=257,C=256):(G=k,da=l,C=-1),O=0,J=0,H=K,z=u,M=L,Q=0,p=-1,W=1<<L,q=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var R=0;;){R++;E=H-Q;v[J]<C?(F=0,D=v[J]):v[J]>C?(F=da[Y+v[J]],D=G[X+v[J]]):(F=96,D=0);m=1<<H-Q;K=n=1<<M;do n-=m,t[z+(O>>Q)+n]=E<<24|F<<16|D|0;while(0!==n);for(m=1<<H-1;O&m;)m>>=1;if(0!==m?(O&=m-1,O+=m):O=0,J++,0===--N[H]){if(H===I)break;H=c[f+v[J]]}if(H>L&&(O&q)!==p){0===Q&&(Q=L);z+=K;M=H-Q;for(m=1<<M;M+
-Q<I&&(m-=N[M+Q],!(0>=m));)M++,m<<=1;if(W+=1<<M,1===d&&852<W||2===d&&592<W)return 1;p=O&q;t[p]=L<<24|M<<16|z-u|0}}return 0!==O&&(t[z+O]=H-Q<<24|4194304),x.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.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(c,f,d){function b(b){for(var d=b.length;0<=--d;)b[d]=0}function e(b,d,c,e,f){this.static_tree=
-b;this.extra_bits=d;this.extra_base=c;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,c){b.bi_valid>W-c?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>W-b.bi_valid,b.bi_valid+=c-W):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=c)}function m(b,d,c){l(b,c[2*d],c[2*d+1])}function n(b,d){var c=0;do c|=1&b,b>>>=1,c<<=1;while(0<
---d);return c>>>1}function p(b,d,c){var e,f=Array(Q+1),g=0;for(e=1;e<=Q;e++)f[e]=g=g+c[e-1]<<1;for(c=0;c<=d;c++)e=b[2*c+1],0!==e&&(b[2*c]=n(f[e]++,e))}function q(b){var d;for(d=0;d<J;d++)b.dyn_ltree[2*d]=0;for(d=0;d<I;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*O]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function t(b){8<b.bi_valid?k(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 u(b,d,c,e){var f=2*d,g=2*c;return b[f]<
-b[g]||b[f]===b[g]&&e[d]<=e[c]}function v(b,d,c){for(var e=b.heap[c],f=c<<1;f<=b.heap_len&&(f<b.heap_len&&u(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!u(d,e,b.heap[f],b.depth));)b.heap[c]=b.heap[f],c=f,f<<=1;b.heap[c]=e}function x(b,d,c){var e,f,g,k,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,d):(g=ba[f],m(b,g+H+1,d),k=da[g],0!==k&&(f-=T[g],l(b,f,k)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],m(b,g,c),k=Y[g],0!==k&&(e-=aa[g],
-l(b,e,k)));while(n<b.last_lit)}m(b,O,d)}function y(b,d){var c,e,f,g=d.dyn_tree;e=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=M;for(c=0;c<l;c++)0!==g[2*c]?(b.heap[++b.heap_len]=m=c,b.depth[c]=0):g[2*c+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=e[2*f+1]);d.max_code=m;for(c=b.heap_len>>1;1<=c;c--)v(b,g,c);f=l;do c=b.heap[1],b.heap[1]=b.heap[b.heap_len--],v(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=
-c,b.heap[--b.heap_max]=e,g[2*f]=g[2*c]+g[2*e],b.depth[f]=(b.depth[c]>=b.depth[e]?b.depth[c]:b.depth[e])+1,g[2*c+1]=g[2*e+1]=f,b.heap[1]=f++,v(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,t=d.stat_desc.static_tree,u=d.stat_desc.has_stree,x=d.stat_desc.extra_bits,y=d.stat_desc.extra_base,A=d.stat_desc.max_length,B=0;for(e=0;e<=Q;e++)b.bl_count[e]=0;k[2*b.heap[b.heap_max]+1]=0;for(c=b.heap_max+1;c<M;c++)f=b.heap[c],e=k[2*k[2*f+1]+1]+1,e>A&&(e=A,B++),k[2*
-f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=y&&(n=x[f-y]),q=k[2*f],b.opt_len+=q*(e+n),u&&(b.static_len+=q*(t[2*f+1]+n)));if(0!==B){do{for(e=A-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[A]--;B-=2}while(0<B);for(e=A;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--c],n>l||(k[2*n+1]!==e&&(b.opt_len+=(e-k[2*n+1])*k[2*n],k[2*n+1]=e),f--)}p(g,m,b.bl_count)}function A(b,d,c){var e,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(c+1)+1]=65535;for(e=0;e<=c;e++)f=k,k=d[2*(e+1)+1],++l<m&&
-f===k||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*G]++):10>=l?b.bl_tree[2*X]++:b.bl_tree[2*N]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function B(b,d,c){var e,f,g=-1,k=d[1],n=0,p=7,q=4;0===k&&(p=138,q=3);for(e=0;e<=c;e++)if(f=k,k=d[2*(e+1)+1],!(++n<p&&f===k)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==g&&(m(b,f,b.bl_tree),n--),m(b,G,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,X,b.bl_tree),l(b,n-3,3)):(m(b,N,b.bl_tree),l(b,n-11,7));n=0;g=f;0===k?(p=138,q=
-3):f===k?(p=6,q=3):(p=7,q=4)}}function z(b){var d,c=4093624447;for(d=0;31>=d;d++,c>>>=1)if(1&c&&0!==b.dyn_ltree[2*d])return F;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(d=32;d<H;d++)if(0!==b.dyn_ltree[2*d])return D;return F}function C(b,d,c,e){l(b,(K<<1)+(e?1:0),3);t(b);k(b,c);k(b,~c);E.arraySet(b.pending_buf,b.window,d,c,b.pending);b.pending+=c}var E=c("../utils/common"),F=0,D=1,K=0,H=256,J=H+1+29,I=30,L=19,M=2*J+1,Q=15,W=16,O=256,G=16,X=17,N=18,da=[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],Y=[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],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=Array(2*(J+2));b(S);var V=Array(2*I);b(V);var ea=Array(512);b(ea);var ba=Array(256);b(ba);var T=Array(29);b(T);var aa=Array(I);b(aa);var ca,U,Z,ha=!1;d._tr_init=function(b){if(!ha){var d,c,f,k=Array(Q+1);for(f=c=0;28>f;f++)for(T[f]=c,d=0;d<1<<da[f];d++)ba[c++]=f;ba[c-1]=f;for(f=c=0;16>f;f++)for(aa[f]=
-c,d=0;d<1<<Y[f];d++)ea[c++]=f;for(c>>=7;f<I;f++)for(aa[f]=c<<7,d=0;d<1<<Y[f]-7;d++)ea[256+c++]=f;for(d=0;d<=Q;d++)k[d]=0;for(d=0;143>=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,J+1,k);for(d=0;d<I;d++)V[2*d+1]=5,V[2*d]=n(d,5);ca=new e(S,da,H+1,J,Q);U=new e(V,Y,0,I,Q);Z=new e([],R,0,L,7);ha=!0}b.l_desc=new g(b.dyn_ltree,ca);b.d_desc=new g(b.dyn_dtree,U);b.bl_desc=new g(b.bl_tree,Z);b.bi_buf=0;b.bi_valid=0;q(b)};
-d._tr_stored_block=C;d._tr_flush_block=function(b,d,c,e){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=z(b));y(b,b.l_desc);y(b,b.d_desc);A(b,b.dyn_ltree,b.l_desc.max_code);A(b,b.dyn_dtree,b.d_desc.max_code);y(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*P[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=c+5;if(c+4<=f&&-1!==d)C(b,d,c,e);else if(4===b.strategy||g===f)l(b,2+(e?1:0),3),x(b,S,V);else{l(b,4+(e?1:0),3);d=b.l_desc.max_code+
-1;c=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,c-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*P[f]+1],3);B(b,b.dyn_ltree,d-1);B(b,b.dyn_dtree,c-1);x(b,b.dyn_ltree,b.dyn_dtree)}q(b);e&&t(b)};d._tr_tally=function(b,d,c){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&c,b.last_lit++,0===d?b.dyn_ltree[2*c]++:(b.matches++,d--,b.dyn_ltree[2*(ba[c]+H+1)]++,b.dyn_dtree[2*(256>d?ea[d]:ea[256+(d>>>7)])]++),b.last_lit===
-b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,O,S);16===b.bi_valid?(k(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(c,f,d){f.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(c,f,d){d=c("./lib/utils/common").assign;
+25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,q,t,u,v,x){var m,n,p,A,C,E,F,D,K=x.bits,H,J,I,L,M,Q,X=0,N,G=null,W=0,O=new b.Buf16(16);A=new b.Buf16(16);var ca=null,Y=0;for(H=0;15>=H;H++)O[H]=0;for(J=0;J<q;J++)O[c[f+J]]++;L=K;for(I=15;1<=I&&0===O[I];I--);if(L>I&&(L=I),0===I)return t[u++]=20971520,t[u++]=20971520,x.bits=1,0;for(K=1;K<I&&0===O[K];K++);L<K&&(L=K);for(H=m=1;15>=H;H++)if(m<<=1,m-=O[H],0>m)return-1;if(0<m&&(0===d||1!==I))return-1;A[1]=0;for(H=1;15>H;H++)A[H+1]=A[H]+O[H];for(J=
+0;J<q;J++)0!==c[f+J]&&(v[A[c[f+J]]++]=J);if(0===d?(G=ca=v,C=19):1===d?(G=e,W-=257,ca=g,Y-=257,C=256):(G=k,ca=l,C=-1),N=0,J=0,H=K,A=u,M=L,Q=0,p=-1,X=1<<L,q=X-1,1===d&&852<X||2===d&&592<X)return 1;for(var S=0;;){S++;E=H-Q;v[J]<C?(F=0,D=v[J]):v[J]>C?(F=ca[Y+v[J]],D=G[W+v[J]]):(F=96,D=0);m=1<<H-Q;K=n=1<<M;do n-=m,t[A+(N>>Q)+n]=E<<24|F<<16|D|0;while(0!==n);for(m=1<<H-1;N&m;)m>>=1;if(0!==m?(N&=m-1,N+=m):N=0,J++,0===--O[H]){if(H===I)break;H=c[f+v[J]]}if(H>L&&(N&q)!==p){0===Q&&(Q=L);A+=K;M=H-Q;for(m=1<<M;M+
+Q<I&&(m-=O[M+Q],!(0>=m));)M++,m<<=1;if(X+=1<<M,1===d&&852<X||2===d&&592<X)return 1;p=N&q;t[p]=L<<24|M<<16|A-u|0}}return 0!==N&&(t[A+N]=H-Q<<24|4194304),x.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.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(c,f,d){function b(b){for(var d=b.length;0<=--d;)b[d]=0}function e(b,d,c,e,f){this.static_tree=
+b;this.extra_bits=d;this.extra_base=c;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,c){b.bi_valid>X-c?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>X-b.bi_valid,b.bi_valid+=c-X):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=c)}function m(b,d,c){l(b,c[2*d],c[2*d+1])}function n(b,d){var c=0;do c|=1&b,b>>>=1,c<<=1;while(0<
+--d);return c>>>1}function p(b,d,c){var e,f=Array(Q+1),g=0;for(e=1;e<=Q;e++)f[e]=g=g+c[e-1]<<1;for(c=0;c<=d;c++)e=b[2*c+1],0!==e&&(b[2*c]=n(f[e]++,e))}function q(b){var d;for(d=0;d<J;d++)b.dyn_ltree[2*d]=0;for(d=0;d<I;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*N]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function t(b){8<b.bi_valid?k(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 u(b,d,c,e){var f=2*d,g=2*c;return b[f]<
+b[g]||b[f]===b[g]&&e[d]<=e[c]}function v(b,d,c){for(var e=b.heap[c],f=c<<1;f<=b.heap_len&&(f<b.heap_len&&u(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!u(d,e,b.heap[f],b.depth));)b.heap[c]=b.heap[f],c=f,f<<=1;b.heap[c]=e}function x(b,d,c){var e,f,g,k,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,d):(g=Z[f],m(b,g+H+1,d),k=ca[g],0!==k&&(f-=T[g],l(b,f,k)),e--,g=256>e?da[e]:da[256+(e>>>7)],m(b,g,c),k=Y[g],0!==k&&(e-=ba[g],l(b,
+e,k)));while(n<b.last_lit)}m(b,N,d)}function z(b,d){var c,e,f,g=d.dyn_tree;e=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=M;for(c=0;c<l;c++)0!==g[2*c]?(b.heap[++b.heap_len]=m=c,b.depth[c]=0):g[2*c+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=e[2*f+1]);d.max_code=m;for(c=b.heap_len>>1;1<=c;c--)v(b,g,c);f=l;do c=b.heap[1],b.heap[1]=b.heap[b.heap_len--],v(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=
+c,b.heap[--b.heap_max]=e,g[2*f]=g[2*c]+g[2*e],b.depth[f]=(b.depth[c]>=b.depth[e]?b.depth[c]:b.depth[e])+1,g[2*c+1]=g[2*e+1]=f,b.heap[1]=f++,v(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,t=d.stat_desc.static_tree,u=d.stat_desc.has_stree,x=d.stat_desc.extra_bits,z=d.stat_desc.extra_base,y=d.stat_desc.max_length,A=0;for(e=0;e<=Q;e++)b.bl_count[e]=0;k[2*b.heap[b.heap_max]+1]=0;for(c=b.heap_max+1;c<M;c++)f=b.heap[c],e=k[2*k[2*f+1]+1]+1,e>y&&(e=y,A++),k[2*
+f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=z&&(n=x[f-z]),q=k[2*f],b.opt_len+=q*(e+n),u&&(b.static_len+=q*(t[2*f+1]+n)));if(0!==A){do{for(e=y-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[y]--;A-=2}while(0<A);for(e=y;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--c],n>l||(k[2*n+1]!==e&&(b.opt_len+=(e-k[2*n+1])*k[2*n],k[2*n+1]=e),f--)}p(g,m,b.bl_count)}function y(b,d,c){var e,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(c+1)+1]=65535;for(e=0;e<=c;e++)f=k,k=d[2*(e+1)+1],++l<m&&
+f===k||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*G]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*O]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function B(b,d,c){var e,f,g=-1,k=d[1],n=0,p=7,q=4;0===k&&(p=138,q=3);for(e=0;e<=c;e++)if(f=k,k=d[2*(e+1)+1],!(++n<p&&f===k)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==g&&(m(b,f,b.bl_tree),n--),m(b,G,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,O,b.bl_tree),l(b,n-11,7));n=0;g=f;0===k?(p=138,q=
+3):f===k?(p=6,q=3):(p=7,q=4)}}function A(b){var d,c=4093624447;for(d=0;31>=d;d++,c>>>=1)if(1&c&&0!==b.dyn_ltree[2*d])return F;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(d=32;d<H;d++)if(0!==b.dyn_ltree[2*d])return D;return F}function C(b,d,c,e){l(b,(K<<1)+(e?1:0),3);t(b);k(b,c);k(b,~c);E.arraySet(b.pending_buf,b.window,d,c,b.pending);b.pending+=c}var E=c("../utils/common"),F=0,D=1,K=0,H=256,J=H+1+29,I=30,L=19,M=2*J+1,Q=15,X=16,N=256,G=16,W=17,O=18,ca=[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],Y=[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],S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(J+2));b(R);var V=Array(2*I);b(V);var da=Array(512);b(da);var Z=Array(256);b(Z);var T=Array(29);b(T);var ba=Array(I);b(ba);var ea,U,aa,ha=!1;d._tr_init=function(b){if(!ha){var d,c,f,k=Array(Q+1);for(f=c=0;28>f;f++)for(T[f]=c,d=0;d<1<<ca[f];d++)Z[c++]=f;Z[c-1]=f;for(f=c=0;16>f;f++)for(ba[f]=
+c,d=0;d<1<<Y[f];d++)da[c++]=f;for(c>>=7;f<I;f++)for(ba[f]=c<<7,d=0;d<1<<Y[f]-7;d++)da[256+c++]=f;for(d=0;d<=Q;d++)k[d]=0;for(d=0;143>=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,J+1,k);for(d=0;d<I;d++)V[2*d+1]=5,V[2*d]=n(d,5);ea=new e(R,ca,H+1,J,Q);U=new e(V,Y,0,I,Q);aa=new e([],S,0,L,7);ha=!0}b.l_desc=new g(b.dyn_ltree,ea);b.d_desc=new g(b.dyn_dtree,U);b.bl_desc=new g(b.bl_tree,aa);b.bi_buf=0;b.bi_valid=0;q(b)};
+d._tr_stored_block=C;d._tr_flush_block=function(b,d,c,e){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=A(b));z(b,b.l_desc);z(b,b.d_desc);y(b,b.dyn_ltree,b.l_desc.max_code);y(b,b.dyn_dtree,b.d_desc.max_code);z(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*P[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=c+5;if(c+4<=f&&-1!==d)C(b,d,c,e);else if(4===b.strategy||g===f)l(b,2+(e?1:0),3),x(b,R,V);else{l(b,4+(e?1:0),3);d=b.l_desc.max_code+
+1;c=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,c-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*P[f]+1],3);B(b,b.dyn_ltree,d-1);B(b,b.dyn_dtree,c-1);x(b,b.dyn_ltree,b.dyn_dtree)}q(b);e&&t(b)};d._tr_tally=function(b,d,c){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&c,b.last_lit++,0===d?b.dyn_ltree[2*c]++:(b.matches++,d--,b.dyn_ltree[2*(Z[c]+H+1)]++,b.dyn_dtree[2*(256>d?da[d]:da[256+(d>>>7)])]++),b.last_lit===
+b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,N,R);16===b.bi_valid?(k(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(c,f,d){f.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(c,f,d){d=c("./lib/utils/common").assign;
var b=c("./lib/deflate"),e=c("./lib/inflate");c=c("./lib/zlib/constants");var g={};d(g,b,e,c);f.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,c){var f="",d,b,e,g,k,l,m=0;for(null!=c&&c||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),b=a.charCodeAt(m++),e=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|b>>4,k=(b&15)<<2|e>>6,l=e&63,isNaN(b)?k=l=64:isNaN(e)&&(l=64),f=f+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return f},decode:function(a,c){c=null!=c?c:!1;var f="",d,b,e,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),b=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|b>>4,b=(b&15)<<4|g>>2,e=(g&3)<<6|k,f+=String.fromCharCode(d),64!=g&&(f+=String.fromCharCode(b)),64!=k&&(f+=String.fromCharCode(e));c||(f=Base64._utf8_decode(f));return f},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var c="",f=0;f<a.length;f++){var d=a.charCodeAt(f);128>d?c+=String.fromCharCode(d):(127<d&&2048>d?c+=
String.fromCharCode(d>>6|192):(c+=String.fromCharCode(d>>12|224),c+=String.fromCharCode(d>>6&63|128)),c+=String.fromCharCode(d&63|128))}return c},_utf8_decode:function(a){var c="",f=0,d;for(c1=c2=0;f<a.length;)d=a.charCodeAt(f),128>d?(c+=String.fromCharCode(d),f++):191<d&&224>d?(c2=a.charCodeAt(f+1),c+=String.fromCharCode((d&31)<<6|c2&63),f+=2):(c2=a.charCodeAt(f+1),c3=a.charCodeAt(f+2),c+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),f+=3);return c}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
@@ -250,7 +250,7 @@ post:function(a,c,f,d){return(new mxXmlRequest(a,c)).send(f,d)},submit:function(
equalEntries:function(a,c){if(null==a&&null!=c||null!=a&&null==c||null!=a&&null!=c&&a.length!=c.length)return!1;if(null!=a&&null!=c){var f=0,d;for(d in c)f++;for(d in a)if(f--,!(mxUtils.isNaN(a[d])&&mxUtils.isNaN(c[d])||a[d]==c[d]))return!1}return 0==f},removeDuplicates:function(a){for(var c=new mxDictionary,f=[],d=0;d<a.length;d++)c.get(a[d])||(f.push(a[d]),c.put(a[d],!0));return f},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,c){var f=function(){};f.prototype=c.prototype;
a.prototype=new f;a.prototype.constructor=a},toString:function(a){var c="",f;for(f in a)try{if(null==a[f])c+=f+" = [null]\n";else if("function"==typeof a[f])c+=f+" => [Function]\n";else if("object"==typeof a[f])var d=mxUtils.getFunctionName(a[f].constructor),c=c+(f+" => ["+d+"]\n");else c+=f+" = "+a[f]+"\n"}catch(b){c+=f+"="+b.message}return c},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,c,f,d,b,e,g,k,l){k-=a;l-=c;if(0===f||0===d)return q;
f=Math.abs(f);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(b*Math.PI/180),q=Math.sin(b*Math.PI/180);b=p*m+q*n;var m=-1*q*m+p*n,n=b*b,t=m*m,u=f*f,v=d*d,x=n/u+t/v;1<x?(f*=Math.sqrt(x),d*=Math.sqrt(x),e=0):(x=1,e===g&&(x=-1),e=x*Math.sqrt((u*v-u*t-v*n)/(u*t+v*n)));n=e*f*m/d;t=-1*e*d*b/f;k=p*n-q*t+k/2;l=q*n+p*t+l/2;u=Math.atan2((m-t)/d,(b-n)/f)-Math.atan2(0,1);e=0<=u?u:2*Math.PI+u;u=Math.atan2((-m-t)/d,(-b-n)/f)-Math.atan2((m-t)/d,(b-n)/f);b=0<=u?u:2*Math.PI+u;0==g&&0<b?b-=2*Math.PI:0!=g&&0>b&&(b+=2*Math.PI);
-g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;m=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);n=p*f;p*=d;f*=q;d*=q;for(var y=Math.cos(e),A=Math.sin(e),t=-m*(n*A+d*y),u=-m*(f*A-p*y),q=[],B=0;B<g;++B){e+=b;var y=Math.cos(e),A=Math.sin(e),v=n*y-d*A+k,x=f*y+p*A+l,z=-m*(n*A+d*y),y=-m*(f*A-p*y),A=6*B;q[A]=Number(t+a);q[A+1]=Number(u+c);q[A+2]=Number(v-z+a);q[A+3]=Number(x-y+c);q[A+4]=Number(v+a);q[A+5]=Number(x+c);t=v+z;u=x+y}return q},getBoundingBox:function(a,c,f){var d=null;if(null!=a&&null!=c&&0!=c){c=
+g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;m=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);n=p*f;p*=d;f*=q;d*=q;for(var z=Math.cos(e),y=Math.sin(e),t=-m*(n*y+d*z),u=-m*(f*y-p*z),q=[],B=0;B<g;++B){e+=b;var z=Math.cos(e),y=Math.sin(e),v=n*z-d*y+k,x=f*z+p*y+l,A=-m*(n*y+d*z),z=-m*(f*y-p*z),y=6*B;q[y]=Number(t+a);q[y+1]=Number(u+c);q[y+2]=Number(v-A+a);q[y+3]=Number(x-z+c);q[y+4]=Number(v+a);q[y+5]=Number(x+c);t=v+A;u=x+z}return q},getBoundingBox:function(a,c,f){var d=null;if(null!=a&&null!=c&&0!=c){c=
mxUtils.toRadians(c);var d=Math.cos(c),b=Math.sin(c);f=null!=f?f:new mxPoint(a.x+a.width/2,a.y+a.height/2);var e=new mxPoint(a.x,a.y);c=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(c.x,a.y+a.height);a=new mxPoint(a.x,g.y);e=mxUtils.getRotatedPoint(e,d,b,f);c=mxUtils.getRotatedPoint(c,d,b,f);g=mxUtils.getRotatedPoint(g,d,b,f);a=mxUtils.getRotatedPoint(a,d,b,f);d=new mxRectangle(e.x,e.y,0,0);d.add(new mxRectangle(c.x,c.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,c,f,d){d=null!=d?d:new mxPoint;var b=a.x-d.x;a=a.y-d.y;return new mxPoint(b*c-a*f+d.x,a*c+b*f+d.y)},getPortConstraints:function(a,c,f,d){c=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(c.style,f?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==c)return d;d=c.toString();c=mxConstants.DIRECTION_MASK_NONE;f=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(f=mxUtils.getValue(a.style,
mxConstants.STYLE_ROTATION,0));a=0;45<f?(a=1,135<=f&&(a=2)):-45>f&&(a=3,-135>=f&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:c|=mxConstants.DIRECTION_MASK_EAST;break;case 2:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:c|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_WEST;break;case 1:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:c|=mxConstants.DIRECTION_MASK_EAST;
@@ -523,11 +523,11 @@ mxSvgCanvas2D.prototype.updateText=function(a,c,f,d,b,e,g,k,l,m,n){if(null!=n&&n
mxConstants.ALIGN_CENTER?l-=f/2:b==mxConstants.ALIGN_RIGHT&&(l-=f);a+=l;e==mxConstants.ALIGN_MIDDLE?g-=d/2:e==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(g-=2);c+=g;b=1!=t.scale?"scale("+t.scale+")":"";0!=t.rotation&&this.rotateHtml?(b+="rotate("+t.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*t.scale,(c+d/2)*t.scale,t.rotation,t.rotationCx,t.rotationCy),a=c.x-f*t.scale/2,c=c.y-d*t.scale/2):(a*=t.scale,c*=t.scale);0!=m&&(b+="rotate("+m+","+-l+","+-g+")");
n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(c)+")"+b);p.setAttribute("width",Math.round(Math.max(1,f)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,m,n,p,q){if(this.textEnabled&&null!=b){p=null!=p?p:0;var t=this.state;a+=t.dx;c+=t.dy;if(this.foEnabled&&"html"==l){var u="vertical-align:top;";n?u+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(f)+"px;":"fill"==m?u+="width:"+Math.round(f+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(u+="width:"+Math.round(f+1)+"px;",0<d&&(u+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var u=k&&0<f?u+("width:"+
-Math.round(f+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):u+"white-space:nowrap;",v=this.createElement("g");1>t.alpha&&v.setAttribute("opacity",t.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events","all");u=this.createDiv(b,e,g,u,m);if(null!=u){null!=q&&u.setAttribute("dir",q);v.appendChild(x);this.root.appendChild(v);var y,A;q=y=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
-document?(u.style.visibility="hidden",document.body.appendChild(u)):x.appendChild(u);var B=u;null!=B.firstChild&&"DIV"==B.firstChild.nodeName&&(B=B.firstChild,k&&"break-word"==u.style.wordWrap&&(B.style.width="100%"));z=B.offsetWidth;0==z&&u.parentNode==x&&(u.style.visibility="hidden",document.body.appendChild(u),z=B.offsetWidth);this.cacheOffsetSize&&(v.mxCachedOffsetWidth=z);!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(C=u.style.whiteSpace,u.style.whiteSpace="nowrap",z<
-B.offsetWidth&&(u.style.whiteSpace=C));y=z+y-1;k&&"fill"!=m&&"width"!=m&&(n&&(y=Math.min(y,f)),u.style.width=y+"px");y=B.offsetWidth;A=B.offsetHeight;this.cacheOffsetSize&&(v.mxCachedFinalOffsetWidth=y,v.mxCachedFinalOffsetHeight=A);A-=q;u.parentNode!=x&&(x.appendChild(u),u.style.visibility="")}else{B=document.createElement("div");B.style.cssText=u.getAttribute("style");B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.style.position="absolute";B.style.visibility="hidden";A=document.createElement("div");
-A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;B.appendChild(A);document.body.appendChild(B);8!=document.documentMode&&9!=document.documentMode&&null!=t.fontBorderColor&&(y+=2,q+=2);if(k&&0<f){var z=A.offsetWidth;if(!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m){var C=B.style.whiteSpace;A.style.whiteSpace="nowrap";z<A.offsetWidth&&(B.style.whiteSpace=C)}n&&(z=Math.min(z,f));B.style.width=z+"px";
-y=A.offsetWidth+y+0;A=A.offsetHeight+q;B.style.display="inline-block";B.style.position="";B.style.visibility="";B.style.width=y+"px";u.setAttribute("style",B.style.cssText)}else y=A.offsetWidth+y,A=A.offsetHeight+q;B.parentNode.removeChild(B);x.appendChild(u)}n&&(A=Math.min(A,d),y=Math.min(y,f));"width"==m?d=A:"fill"!=m&&(f=y,d=A);1>t.alpha&&v.setAttribute("opacity",t.alpha);q=u=0;e==mxConstants.ALIGN_CENTER?u-=f/2:e==mxConstants.ALIGN_RIGHT&&(u-=f);a+=u;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+Math.round(f+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):u+"white-space:nowrap;",v=this.createElement("g");1>t.alpha&&v.setAttribute("opacity",t.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events","all");u=this.createDiv(b,e,g,u,m);if(null!=u){null!=q&&u.setAttribute("dir",q);v.appendChild(x);this.root.appendChild(v);var z,y;q=z=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
+document?(u.style.visibility="hidden",document.body.appendChild(u)):x.appendChild(u);var B=u;null!=B.firstChild&&"DIV"==B.firstChild.nodeName&&(B=B.firstChild,k&&"break-word"==u.style.wordWrap&&(B.style.width="100%"));A=B.offsetWidth;0==A&&u.parentNode==x&&(u.style.visibility="hidden",document.body.appendChild(u),A=B.offsetWidth);this.cacheOffsetSize&&(v.mxCachedOffsetWidth=A);!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(C=u.style.whiteSpace,u.style.whiteSpace="nowrap",A<
+B.offsetWidth&&(u.style.whiteSpace=C));z=A+z-1;k&&"fill"!=m&&"width"!=m&&(n&&(z=Math.min(z,f)),u.style.width=z+"px");z=B.offsetWidth;y=B.offsetHeight;this.cacheOffsetSize&&(v.mxCachedFinalOffsetWidth=z,v.mxCachedFinalOffsetHeight=y);y-=q;u.parentNode!=x&&(x.appendChild(u),u.style.visibility="")}else{B=document.createElement("div");B.style.cssText=u.getAttribute("style");B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.style.position="absolute";B.style.visibility="hidden";y=document.createElement("div");
+y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.wordWrap=mxConstants.WORD_WRAP;y.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;B.appendChild(y);document.body.appendChild(B);8!=document.documentMode&&9!=document.documentMode&&null!=t.fontBorderColor&&(z+=2,q+=2);if(k&&0<f){var A=y.offsetWidth;if(!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m){var C=B.style.whiteSpace;y.style.whiteSpace="nowrap";A<y.offsetWidth&&(B.style.whiteSpace=C)}n&&(A=Math.min(A,f));B.style.width=A+"px";
+z=y.offsetWidth+z+0;y=y.offsetHeight+q;B.style.display="inline-block";B.style.position="";B.style.visibility="";B.style.width=z+"px";u.setAttribute("style",B.style.cssText)}else z=y.offsetWidth+z,y=y.offsetHeight+q;B.parentNode.removeChild(B);x.appendChild(u)}n&&(y=Math.min(y,d),z=Math.min(z,f));"width"==m?d=y:"fill"!=m&&(f=z,d=y);1>t.alpha&&v.setAttribute("opacity",t.alpha);q=u=0;e==mxConstants.ALIGN_CENTER?u-=f/2:e==mxConstants.ALIGN_RIGHT&&(u-=f);a+=u;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);c+=q;B=1!=t.scale?"scale("+t.scale+")":"";0!=t.rotation&&this.rotateHtml?(B+="rotate("+t.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*t.scale,(c+d/2)*t.scale,t.rotation,t.rotationCx,t.rotationCy),a=c.x-f*t.scale/2,c=c.y-d*t.scale/2):(a*=t.scale,c*=t.scale);0!=p&&(B+="rotate("+p+","+-u+","+-q+")");v.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+")"+B);x.setAttribute("width",
Math.round(Math.max(1,f)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,c,f,d,b,e,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(x),f.appendChild(a),v.appendChild(f)))}}else this.plainText(a,c,f,d,b,e,g,k,m,n,p,q)}};
mxSvgCanvas2D.prototype.createClip=function(a,c,f,d){a=Math.round(a);c=Math.round(c);f=Math.round(f);d=Math.round(d);for(var b="mx-clip-"+a+"-"+c+"-"+f+"-"+d,e=0,g=b+"-"+e;null!=document.getElementById(g);)g=b+"-"+ ++e;clip=this.createElement("clipPath");clip.setAttribute("id",g);b=this.createElement("rect");b.setAttribute("x",a);b.setAttribute("y",c);b.setAttribute("width",f);b.setAttribute("height",d);clip.appendChild(b);return clip};
@@ -561,11 +561,11 @@ mxVmlCanvas2D.prototype.createDiv=function(a,c,f,d){f=this.createElement("div");
e,f.innerHTML=a);a=f.style;a.fontSize=b.fontSize/this.vmlScale+"px";a.fontFamily=b.fontFamily;a.color=b.fontColor;a.verticalAlign="top";a.textAlign=c||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?b.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
(a.textDecoration="underline");return f};
mxVmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,m,n,p,q){if(this.textEnabled&&null!=b){var t=this.state;if("html"==l){null!=t.rotation&&(c=this.rotatePoint(a,c,t.rotation,t.rotationCx,t.rotationCy),a=c.x,c=c.y);8!=document.documentMode||mxClient.IS_EM?(a*=t.scale,c*=t.scale):(a+=t.dx,c+=t.dy,"fill"!=m&&g==mxConstants.ALIGN_TOP&&--c);l=8!=document.documentMode||mxClient.IS_EM?this.createElement("div"):this.createVmlElement("group");l.style.position="absolute";l.style.display="inline";l.style.left=
-this.format(a)+"px";l.style.top=this.format(c)+"px";l.style.zoom=t.scale;var u=this.createElement("div");u.style.position="relative";u.style.display="inline";var v=mxUtils.getAlignmentAsPoint(e,g),x=v.x,v=v.y;b=this.createDiv(b,e,g,m);e=this.createElement("div");null!=q&&b.setAttribute("dir",q);if(k&&0<f){if(n||(b.style.width=Math.round(f)+"px"),b.style.wordWrap=mxConstants.WORD_WRAP,b.style.whiteSpace="normal","break-word"==b.style.wordWrap){var y=b;null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&
-(y.firstChild.style.width="100%")}}else b.style.whiteSpace="nowrap";p=t.rotation+(p||0);this.rotateHtml&&0!=p?(e.style.display="inline",e.style.zoom="1",e.appendChild(b),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?l.appendChild(e):(u.appendChild(e),l.appendChild(u))):8!=document.documentMode||mxClient.IS_EM?(b.style.display="inline",l.appendChild(b)):(u.appendChild(b),l.appendChild(u));"DIV"!=this.root.nodeName?(q=this.createVmlElement("rect"),q.stroked="false",q.filled="false",
-q.appendChild(l),this.root.appendChild(q)):this.root.appendChild(l);n?(b.style.overflow="hidden",b.style.width=Math.round(f)+"px",mxClient.IS_QUIRKS||(b.style.maxHeight=Math.round(d)+"px")):"fill"==m?(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.height=Math.max(0,d)+1+"px"):"width"==m&&(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){y=Math.PI/180*p;p=parseFloat(parseFloat(Math.cos(y)).toFixed(8));
-q=parseFloat(parseFloat(Math.sin(-y)).toFixed(8));y%=2*Math.PI;0>y&&(y+=2*Math.PI);y%=Math.PI;y>Math.PI/2&&(y=Math.PI-y);g=Math.cos(y);var A=Math.sin(y);8!=document.documentMode||mxClient.IS_EM||(b.style.display="inline-block",e.style.display="inline-block",u.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);u=b;null!=u.firstChild&&"DIV"==u.firstChild.nodeName&&(u=u.firstChild);y=u.offsetWidth+3;u=u.offsetHeight;n?(f=Math.min(f,y),u=
-Math.min(u,d)):f=y;k&&(b.style.width=f+"px");mxClient.IS_QUIRKS&&(n||"width"==m)&&u>d&&(u=d,b.style.height=u+"px");d=u;n=(d-d*g+f*-A)/2-q*f*(x+.5)+p*d*(v+.5);k=(f-f*g+d*-A)/2+p*f*(x+.5)+q*d*(v+.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-f/2)*t.scale)+"px",m.style.top=this.format(c+(n-d/2)*t.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(t=8!=document.documentMode||
+this.format(a)+"px";l.style.top=this.format(c)+"px";l.style.zoom=t.scale;var u=this.createElement("div");u.style.position="relative";u.style.display="inline";var v=mxUtils.getAlignmentAsPoint(e,g),x=v.x,v=v.y;b=this.createDiv(b,e,g,m);e=this.createElement("div");null!=q&&b.setAttribute("dir",q);if(k&&0<f){if(n||(b.style.width=Math.round(f)+"px"),b.style.wordWrap=mxConstants.WORD_WRAP,b.style.whiteSpace="normal","break-word"==b.style.wordWrap){var z=b;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&
+(z.firstChild.style.width="100%")}}else b.style.whiteSpace="nowrap";p=t.rotation+(p||0);this.rotateHtml&&0!=p?(e.style.display="inline",e.style.zoom="1",e.appendChild(b),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?l.appendChild(e):(u.appendChild(e),l.appendChild(u))):8!=document.documentMode||mxClient.IS_EM?(b.style.display="inline",l.appendChild(b)):(u.appendChild(b),l.appendChild(u));"DIV"!=this.root.nodeName?(q=this.createVmlElement("rect"),q.stroked="false",q.filled="false",
+q.appendChild(l),this.root.appendChild(q)):this.root.appendChild(l);n?(b.style.overflow="hidden",b.style.width=Math.round(f)+"px",mxClient.IS_QUIRKS||(b.style.maxHeight=Math.round(d)+"px")):"fill"==m?(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.height=Math.max(0,d)+1+"px"):"width"==m&&(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){z=Math.PI/180*p;p=parseFloat(parseFloat(Math.cos(z)).toFixed(8));
+q=parseFloat(parseFloat(Math.sin(-z)).toFixed(8));z%=2*Math.PI;0>z&&(z+=2*Math.PI);z%=Math.PI;z>Math.PI/2&&(z=Math.PI-z);g=Math.cos(z);var y=Math.sin(z);8!=document.documentMode||mxClient.IS_EM||(b.style.display="inline-block",e.style.display="inline-block",u.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);u=b;null!=u.firstChild&&"DIV"==u.firstChild.nodeName&&(u=u.firstChild);z=u.offsetWidth+3;u=u.offsetHeight;n?(f=Math.min(f,z),u=
+Math.min(u,d)):f=z;k&&(b.style.width=f+"px");mxClient.IS_QUIRKS&&(n||"width"==m)&&u>d&&(u=d,b.style.height=u+"px");d=u;n=(d-d*g+f*-y)/2-q*f*(x+.5)+p*d*(v+.5);k=(f-f*g+d*-y)/2+p*f*(x+.5)+q*d*(v+.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-f/2)*t.scale)+"px",m.style.top=this.format(c+(n-d/2)*t.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(t=8!=document.documentMode||
mxClient.IS_EM?t.scale:1,l.style.left=this.format(a+(k-f/2)*t)+"px",l.style.top=this.format(c+(n-d/2)*t)+"px");e.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+p+", M12="+q+", M21="+-q+", M22="+p+", sizingMethod='auto expand')";e.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(e.style.filter+="alpha(opacity="+100*this.state.alpha+")");e.appendChild(b);b.style.position="";b.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(b.style.verticalAlign=
"top",1>this.state.alpha&&(l.style.filter="alpha(opacity="+100*this.state.alpha+")"),t=b.parentNode,b.style.visibility="hidden",document.body.appendChild(b),f=b.offsetWidth,u=b.offsetHeight,mxClient.IS_QUIRKS&&n&&u>d&&(u=d,b.style.height=u+"px"),d=u,b.style.visibility="",t.appendChild(b),l.style.left=this.format(a+f*x*this.state.scale)+"px",l.style.top=this.format(c+d*v*this.state.scale)+"px"):(1>this.state.alpha&&(b.style.filter="alpha(opacity="+100*this.state.alpha+")"),u.style.left=100*x+"%",u.style.top=
100*v+"%")}else this.plainText(a,c,f,d,mxUtils.htmlEntities(b,!1),e,g,k,l,m,n,p,q)}};
@@ -574,9 +574,9 @@ mxVmlCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,m,n,p,q){k=this.sta
g==mxConstants.ALIGN_BOTTOM?e=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(e=k/2);null!=p&&(f.style.rotation=p,g=Math.PI/180*p,b=Math.sin(g)*e,e*=Math.cos(g));f.appendChild(d);f.style.left=this.format(a-b)+"px";f.style.top=this.format(c+e)+"px";this.root.appendChild(f)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,c){this.graph=a;this.setStates(c)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-F)<y?(l=b-a.getCenterY(),y=Math.abs(b-F),d=!0):Math.abs(b-C)<y?(l=b-a.y,y=Math.abs(b-C),d=!0):Math.abs(b-E)<y&&(l=b-a.y-a.height,y=Math.abs(b-E),d=!0);d&&(t=D,u=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||d},b=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-z)<x?(k=b-a.getCenterX(),x=Math.abs(b-z),c=!0):Math.abs(b-A)<x?(k=b-a.x,x=Math.abs(b-A),c=!0):Math.abs(b-B)<x&&(k=b-a.x-a.width,x=Math.abs(b-B),c=!0);c&&(n=d,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||c},e=this.graph.getView().translate,g=this.graph.getView().scale,k=c.x,l=c.y,m=!1,n=null,p=null,q=!1,t=null,u=null,v=this.getGuideTolerance(),x=v,y=v,v=a.clone();v.x+=c.x;v.y+=c.y;var A=v.x,B=v.x+v.width,z=v.getCenterX(),C=v.y,E=v.y+v.height,F=v.getCenterY();for(c=0;c<this.states.length;c++){var D=this.states[c];null!=D&&(this.horizontal&&(b.call(this,D.getCenterX(),D),b.call(this,D.x,
+mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-F)<z?(l=b-a.getCenterY(),z=Math.abs(b-F),d=!0):Math.abs(b-C)<z?(l=b-a.y,z=Math.abs(b-C),d=!0):Math.abs(b-E)<z&&(l=b-a.y-a.height,z=Math.abs(b-E),d=!0);d&&(t=D,u=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||d},b=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-A)<x?(k=b-a.getCenterX(),x=Math.abs(b-A),c=!0):Math.abs(b-y)<x?(k=b-a.x,x=Math.abs(b-y),c=!0):Math.abs(b-B)<x&&(k=b-a.x-a.width,x=Math.abs(b-B),c=!0);c&&(n=d,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||c},e=this.graph.getView().translate,g=this.graph.getView().scale,k=c.x,l=c.y,m=!1,n=null,p=null,q=!1,t=null,u=null,v=this.getGuideTolerance(),x=v,z=v,v=a.clone();v.x+=c.x;v.y+=c.y;var y=v.x,B=v.x+v.width,A=v.getCenterX(),C=v.y,E=v.y+v.height,F=v.getCenterY();for(c=0;c<this.states.length;c++){var D=this.states[c];null!=D&&(this.horizontal&&(b.call(this,D.getCenterX(),D),b.call(this,D.x,
D),b.call(this,D.x+D.width,D)),this.vertical&&(d.call(this,D.getCenterY(),D),d.call(this,D.y,D),d.call(this,D.y+D.height,D)))}f&&(m||(f=a.x-(this.graph.snap(a.x/g-e.x)+e.x)*g,k=this.graph.snap(k/g)*g-f),q||(e=a.y-(this.graph.snap(a.y/g-e.y)+e.y)*g,l=this.graph.snap(l/g)*g-e));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
[new mxPoint(p,minY),new mxPoint(p,maxY)]:[new mxPoint(p,-this.graph.panDy),new mxPoint(p,g.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(n,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";q||null==this.guideY?null!=this.guideY&&(null!=t&&null!=a&&(minX=Math.min(a.x+k-this.graph.panDx,t.x),maxX=Math.max(a.x+a.width+k-this.graph.panDx,t.x+t.width)),this.guideY.points=null!=minX&&null!=maxX?[new mxPoint(minX,u),
new mxPoint(maxX,u)]:[new mxPoint(-this.graph.panDx,u),new mxPoint(g.scrollWidth-3-this.graph.panDx,u)],this.guideY.stroke=this.getGuideColor(t,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden";c=new mxPoint(k,l)}return c};mxGuide.prototype.getGuideColor=function(a,c){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
@@ -653,19 +653,19 @@ mxRhombus.prototype.paintVertexShape=function(a,c,f,d,b){var e=d/2,g=b/2,k=mxUti
mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,c){null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,c,this.isRounded):this.paintCurvedLine(a,c)};mxPolyline.prototype.paintLine=function(a,c,f){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,c,f,d,!1);a.stroke()};
mxPolyline.prototype.paintCurvedLine=function(a,c){a.begin();var f=c[0],d=c.length;a.moveTo(f.x,f.y);for(f=1;f<d-2;f++){var b=c[f],e=c[f+1];a.quadTo(b.x,b.y,(b.x+e.x)/2,(b.y+e.y)/2)}b=c[d-2];e=c[d-1];a.quadTo(b.x,b.y,e.x,e.y);a.stroke()};
function mxArrow(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.fill=c;this.stroke=f;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=b?b:mxConstants.ARROW_WIDTH;this.spacing=null!=e?e: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,c){var f=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,b=c[0],e=c[c.length-1],g=e.x-b.x,k=e.y-b.y,l=Math.sqrt(g*g+k*k),m=l-2*f-mxConstants.ARROW_SIZE,g=g/l,k=k/l,l=d*k/3,d=-d*g/3,n=b.x-l/2+f*g,b=b.y-d/2+f*k,p=n+l,q=b+d,t=p+m*g,m=q+m*k,u=t+l,v=m+d,x=u-3*l,y=v-3*d;a.begin();a.moveTo(n,b);a.lineTo(p,q);a.lineTo(t,m);a.lineTo(u,v);a.lineTo(e.x-f*g,e.y-f*k);a.lineTo(x,y);a.lineTo(x+l,y+d);a.close();a.fillAndStroke()};
+mxArrow.prototype.paintEdgeShape=function(a,c){var f=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,b=c[0],e=c[c.length-1],g=e.x-b.x,k=e.y-b.y,l=Math.sqrt(g*g+k*k),m=l-2*f-mxConstants.ARROW_SIZE,g=g/l,k=k/l,l=d*k/3,d=-d*g/3,n=b.x-l/2+f*g,b=b.y-d/2+f*k,p=n+l,q=b+d,t=p+m*g,m=q+m*k,u=t+l,v=m+d,x=u-3*l,z=v-3*d;a.begin();a.moveTo(n,b);a.lineTo(p,q);a.lineTo(t,m);a.lineTo(u,v);a.lineTo(e.x-f*g,e.y-f*k);a.lineTo(x,z);a.lineTo(x+l,z+d);a.close();a.fillAndStroke()};
function mxArrowConnector(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.fill=c;this.stroke=f;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=b?b:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=e?e: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 c=this.getEdgeWidth();this.isMarkerStart()&&(c=Math.max(c,this.getStartArrowWidth()));this.isMarkerEnd()&&(c=Math.max(c,this.getEndArrowWidth()));a.grow((c/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,c){var f=this.strokewidth;this.outline&&(f=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+f,b=this.getEndArrowWidth()+f,e=this.outline?this.getEdgeWidth()+f:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+f/2,n=this.startSize+f,f=this.endSize+f,p=this.isArrowRounded(),q=c[c.length-1],t=1;t<c.length-1&&c[t].x==
-c[0].x&&c[t].y==c[0].y;)t++;var u=c[t].x-c[0].x,t=c[t].y-c[0].y,v=Math.sqrt(u*u+t*t);if(0!=v){var x=u/v,y,A=x,B=t/v,z,C=B,v=e*B,E=-e*x,F=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();u=x;t=B;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,x,B,n,d,e,m,!0);else{y=c[0].x+v/2+m*x;z=c[0].y+E/2+m*B;var D=c[0].x-v/2+m*x,K=c[0].y-E/2+m*B;g?(a.moveTo(y,z),F.push(function(){a.lineTo(D,K)})):(a.moveTo(D,K),a.lineTo(y,z))}for(var H=z=y=0,v=0;v<c.length-2;v++)if(E=mxUtils.relativeCcw(c[v].x,
-c[v].y,c[v+1].x,c[v+1].y,c[v+2].x,c[v+2].y),y=c[v+2].x-c[v+1].x,z=c[v+2].y-c[v+1].y,H=Math.sqrt(y*y+z*z),0!=H&&(A=y/H,C=z/H,tmp=Math.max(Math.sqrt((x*A+B*C+1)/2),.04),y=x+A,z=B+C,H=Math.sqrt(y*y+z*z),0!=H)){y/=H;z/=H;var H=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),H=0!=E&&p?Math.max(.1,H):Math.max(tmp,.06),J=c[v+1].x+z*e/2/H,I=c[v+1].y-y*e/2/H;z=c[v+1].x-z*e/2/H;y=c[v+1].y+y*e/2/H;0!=E&&p?-1==E?(E=z+C*e,H=y-A*e,a.lineTo(z+B*e,y-x*e),a.quadTo(J,I,E,H),function(b,d){F.push(function(){a.lineTo(b,
-d)})}(z,y)):(a.lineTo(J,I),function(b,d){var c=J-B*e,f=I+x*e,g=J-C*e,k=I+A*e;F.push(function(){a.quadTo(b,d,c,f)});F.push(function(){a.lineTo(g,k)})}(z,y)):(a.lineTo(J,I),function(b,d){F.push(function(){a.lineTo(b,d)})}(z,y));x=A;B=C}v=e*C;E=-e*A;if(l&&!g)this.paintMarker(a,q.x,q.y,-x,-B,f,b,e,m,!1);else{a.lineTo(q.x-m*A+v/2,q.y-m*C+E/2);var L=q.x-m*A-v/2,M=q.y-m*C-E/2;g?(a.moveTo(L,M),F.splice(0,0,function(){a.moveTo(L,M)})):a.lineTo(L,M)}for(v=F.length-1;0<=v;v--)F[v]();g?(a.end(),a.stroke()):(a.close(),
+c[0].x&&c[t].y==c[0].y;)t++;var u=c[t].x-c[0].x,t=c[t].y-c[0].y,v=Math.sqrt(u*u+t*t);if(0!=v){var x=u/v,z,y=x,B=t/v,A,C=B,v=e*B,E=-e*x,F=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();u=x;t=B;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,x,B,n,d,e,m,!0);else{z=c[0].x+v/2+m*x;A=c[0].y+E/2+m*B;var D=c[0].x-v/2+m*x,K=c[0].y-E/2+m*B;g?(a.moveTo(z,A),F.push(function(){a.lineTo(D,K)})):(a.moveTo(D,K),a.lineTo(z,A))}for(var H=A=z=0,v=0;v<c.length-2;v++)if(E=mxUtils.relativeCcw(c[v].x,
+c[v].y,c[v+1].x,c[v+1].y,c[v+2].x,c[v+2].y),z=c[v+2].x-c[v+1].x,A=c[v+2].y-c[v+1].y,H=Math.sqrt(z*z+A*A),0!=H&&(y=z/H,C=A/H,tmp=Math.max(Math.sqrt((x*y+B*C+1)/2),.04),z=x+y,A=B+C,H=Math.sqrt(z*z+A*A),0!=H)){z/=H;A/=H;var H=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),H=0!=E&&p?Math.max(.1,H):Math.max(tmp,.06),J=c[v+1].x+A*e/2/H,I=c[v+1].y-z*e/2/H;A=c[v+1].x-A*e/2/H;z=c[v+1].y+z*e/2/H;0!=E&&p?-1==E?(E=A+C*e,H=z-y*e,a.lineTo(A+B*e,z-x*e),a.quadTo(J,I,E,H),function(b,d){F.push(function(){a.lineTo(b,
+d)})}(A,z)):(a.lineTo(J,I),function(b,d){var c=J-B*e,f=I+x*e,g=J-C*e,k=I+y*e;F.push(function(){a.quadTo(b,d,c,f)});F.push(function(){a.lineTo(g,k)})}(A,z)):(a.lineTo(J,I),function(b,d){F.push(function(){a.lineTo(b,d)})}(A,z));x=y;B=C}v=e*C;E=-e*y;if(l&&!g)this.paintMarker(a,q.x,q.y,-x,-B,f,b,e,m,!1);else{a.lineTo(q.x-m*y+v/2,q.y-m*C+E/2);var L=q.x-m*y-v/2,M=q.y-m*C-E/2;g?(a.moveTo(L,M),F.splice(0,0,function(){a.moveTo(L,M)})):a.lineTo(L,M)}for(v=F.length-1;0<=v;v--)F[v]();g?(a.end(),a.stroke()):(a.close(),
a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<c.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,c[0].x,c[0].y,u,t,n,d,e,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-x,-B,f,b,e,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,c,f,d,b,e,g,k,l,m){g=k/g;var n=k*b/2;k=-k*d/2;var p=(l+e)*d;e=(l+e)*b;m?a.moveTo(c-n+p,f-k+e):a.lineTo(c-n+p,f-k+e);a.lineTo(c-n/g+p,f-k/g+e);a.lineTo(c+l*d,f+l*b);a.lineTo(c+n/g+p,f+k/g+e);a.lineTo(c+n+p,f+k+e)};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,c,f,d,b,e,g,k,l,m,n,p,q,t,u,v,x,y,A,B,z){mxShape.call(this);this.value=a;this.bounds=c;this.color=null!=b?b:"black";this.align=null!=f?f:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=e?e:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
-this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=t?t:!0;this.background=u;this.border=v;this.wrap=null!=x?x:!1;this.clipped=null!=y?y:!1;this.overflow=null!=A?A:"visible";this.labelPadding=null!=B?B:0;this.textDirection=z;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,c,f,d,b,e,g,k,l,m,n,p,q,t,u,v,x,z,y,B,A){mxShape.call(this);this.value=a;this.bounds=c;this.color=null!=b?b:"black";this.align=null!=f?f:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=e?e:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
+this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=t?t:!0;this.background=u;this.border=v;this.wrap=null!=x?x:!1;this.clipped=null!=z?z:!1;this.overflow=null!=y?y:"visible";this.labelPadding=null!=B?B:0;this.textDirection=A;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,c){var f=this.scale,d=this.bounds.x/f,b=this.bounds.y/f,e=this.bounds.width/f,f=this.bounds.height/f;this.updateTransform(a,d,b,e,f);this.configureCanvas(a,d,b,e,f);var g=null!=this.state?this.state.unscaledWidth:null;if(c)null==this.node.firstChild||null!=g&&this.lastUnscaledWidth==g||a.invalidateCachedOffsetSize(this.node),a.updateText(d,b,e,f,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node);else{var k=mxUtils.isNode(this.value)||
@@ -859,9 +859,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}else for(f++,b=0;b<this.nestedBestRanks.length;b++)for(e=a.ranks[b],g=0;g<e.length;g++)k=e[g],k.setGeneralPurposeVariable(b,g);if(0==d)break}f=[];d=[];for(c=0;c<a.maxRank+1;c++)d[c]=[],f[c]=d[c];for(c=0;c<this.nestedBestRanks.length;c++)for(b=0;b<this.nestedBestRanks[c].length;b++)d[c].push(this.nestedBestRanks[c][b]);a.ranks=f};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var c=a.ranks.length,f=0,d=1;d<c;d++)f+=this.calculateRankCrossing(d,a);return f};
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,c){for(var f=0,d=c.ranks[a],b=c.ranks[a-1],e=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(b,a){return b-a});e[l]=m}d=[];for(g=0;g<e.length;g++)d=d.concat(e[g]);for(e=1;e<b.length;)e<<=1;l=2*e-1;--e;b=[];for(g=0;g<l;++g)b[g]=0;for(g=0;g<d.length;g++)for(l=d[g]+e,++b[l];0<
l;)l%2&&(f+=b[l+1]),l=l-1>>1,++b[l];return f};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;e<c.ranks.length;e++){for(var g=c.ranks[e],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(e);0>n&&(n=l);k[n]=m}for(var p=null,q=null,t,u,v=null,x=null,y,A=null,l=0;l<g.length-1;l++){if(0==l){y=k[l];m=y.getNextLayerConnectedCells(e);n=y.getPreviousLayerConnectedCells(e);t=[];u=[];for(var B=0;B<m.length;B++)t[B]=m[B].getGeneralPurposeVariable(e+1);for(B=
-0;B<n.length;B++)u[B]=n[B].getGeneralPurposeVariable(e-1)}else m=p,n=q,t=v,u=x,y=A;A=k[l+1];p=A.getNextLayerConnectedCells(e);q=A.getPreviousLayerConnectedCells(e);v=[];x=[];for(B=0;B<p.length;B++)v[B]=p[B].getGeneralPurposeVariable(e+1);for(B=0;B<q.length;B++)x[B]=q[B].getGeneralPurposeVariable(e-1);for(var z=0,C=0,B=0;B<t.length;B++)for(var E=0;E<v.length;E++)t[B]>v[E]&&z++,t[B]<v[E]&&C++;for(B=0;B<u.length;B++)for(E=0;E<x.length;E++)u[B]>x[E]&&z++,u[B]<x[E]&&C++;if(C<z||C==z&&b)p=y.getGeneralPurposeVariable(e),
-y.setGeneralPurposeVariable(e,A.getGeneralPurposeVariable(e)),A.setGeneralPurposeVariable(e,p),p=m,q=n,v=t,x=u,A=y,b||(f=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,c){var f=0==a%2;if(f)for(var d=c.maxRank-1;0<=d;d--)this.medianRank(d,f);else for(d=1;d<c.maxRank;d++)this.medianRank(d,f)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;e<c.ranks.length;e++){for(var g=c.ranks[e],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(e);0>n&&(n=l);k[n]=m}for(var p=null,q=null,t,u,v=null,x=null,z,y=null,l=0;l<g.length-1;l++){if(0==l){z=k[l];m=z.getNextLayerConnectedCells(e);n=z.getPreviousLayerConnectedCells(e);t=[];u=[];for(var B=0;B<m.length;B++)t[B]=m[B].getGeneralPurposeVariable(e+1);for(B=
+0;B<n.length;B++)u[B]=n[B].getGeneralPurposeVariable(e-1)}else m=p,n=q,t=v,u=x,z=y;y=k[l+1];p=y.getNextLayerConnectedCells(e);q=y.getPreviousLayerConnectedCells(e);v=[];x=[];for(B=0;B<p.length;B++)v[B]=p[B].getGeneralPurposeVariable(e+1);for(B=0;B<q.length;B++)x[B]=q[B].getGeneralPurposeVariable(e-1);for(var A=0,C=0,B=0;B<t.length;B++)for(var E=0;E<v.length;E++)t[B]>v[E]&&A++,t[B]<v[E]&&C++;for(B=0;B<u.length;B++)for(E=0;E<x.length;E++)u[B]>x[E]&&A++,u[B]<x[E]&&C++;if(C<A||C==A&&b)p=z.getGeneralPurposeVariable(e),
+z.setGeneralPurposeVariable(e,y.getGeneralPurposeVariable(e)),y.setGeneralPurposeVariable(e,p),p=m,q=n,v=t,x=u,y=z,b||(f=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,c){var f=0==a%2;if(f)for(var d=c.maxRank-1;0<=d;d--)this.medianRank(d,f);else for(d=1;d<c.maxRank;d++)this.medianRank(d,f)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,c){for(var f=this.nestedBestRanks[a].length,d=[],b=[],e=0;e<f;e++){var g=this.nestedBestRanks[a][e],k=new MedianCellSorter;k.cell=g;var l;l=c?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=c?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):b[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(e=0;e<f;e++)null==b[e]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
e))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,c){for(var f=[],d=0,b=0;b<a.length;b++){var e=a[b];f[d++]=e.getGeneralPurposeVariable(c)}f.sort(function(b,a){return b-a});if(1==d%2)return f[Math.floor(d/2)];if(2==d)return(f[0]+f[1])/2;b=d/2;e=f[b-1]-f[0];d=f[d-1]-f[b];return(f[b-1]*d+f[b]*e)/(e+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
MedianCellSorter.prototype.compare=function(a,c){return null!=a&&null!=c?c.medianValue>a.medianValue?-1:c.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -874,8 +874,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 c=1E8;if(this.fineTuning)for(var f=0;f<this.maxIterations;f++){0!=f&&(this.medianPos(f,a),this.minNode(a));if(this.currentXDelta<c){for(var d=0;d<a.ranks.length;d++)for(var b=a.ranks[d],e=0;e<b.length;e++){var g=b[e];g.setX(d,g.getGeneralPurposeVariable(d))}c=this.currentXDelta}else for(d=0;d<a.ranks.length;d++)for(b=
a.ranks[d],e=0;e<b.length;e++)g=b[e],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 c=[],f=new mxDictionary,d=[],b=0;b<=a.maxRank;b++){d[b]=a.ranks[b];for(var e=0;e<d[b].length;e++){var g=d[b][e],k=new WeightedCellSorter(g,b);k.rankIndex=e;k.visited=!0;c.push(k);f.put(g,k)}}a=10*c.length;for(e=0;0<c.length&&e<=a;){var g=c.shift(),b=g.cell,l=g.weightedValue,m=parseInt(g.rankIndex),k=b.getNextLayerConnectedCells(l),n=b.getPreviousLayerConnectedCells(l),p=k.length,q=n.length,t=this.medianXValue(k,l+1),u=this.medianXValue(n,
-l-1),v=p+q,x=b.getGeneralPurposeVariable(l),y=x;0<v&&(y=(t*p+u*q)/v);p=!1;y<x-1?0==m?(b.setGeneralPurposeVariable(l,y),p=!0):(m=d[l][m-1],x=m.getGeneralPurposeVariable(l),x=x+m.width/2+this.intraCellSpacing+b.width/2,x<y?(b.setGeneralPurposeVariable(l,y),p=!0):x<b.getGeneralPurposeVariable(l)-1&&(b.setGeneralPurposeVariable(l,x),p=!0)):y>x+1&&(m==d[l].length-1?(b.setGeneralPurposeVariable(l,y),p=!0):(m=d[l][m+1],x=m.getGeneralPurposeVariable(l),x=x-m.width/2-this.intraCellSpacing-b.width/2,x>y?(b.setGeneralPurposeVariable(l,
-y),p=!0):x>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,x),p=!0)));if(p){for(b=0;b<k.length;b++)l=k[b],l=f.get(l),null!=l&&0==l.visited&&(l.visited=!0,c.push(l));for(b=0;b<n.length;b++)l=n[b],l=f.get(l),null!=l&&0==l.visited&&(l.visited=!0,c.push(l))}g.visited=!1;e++}};mxCoordinateAssignment.prototype.medianPos=function(a,c){if(0==a%2)for(var f=c.maxRank;0<f;f--)this.rankMedianPosition(f-1,c,f);else for(f=0;f<c.maxRank-1;f++)this.rankMedianPosition(f+1,c,f)};
+l-1),v=p+q,x=b.getGeneralPurposeVariable(l),z=x;0<v&&(z=(t*p+u*q)/v);p=!1;z<x-1?0==m?(b.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m-1],x=m.getGeneralPurposeVariable(l),x=x+m.width/2+this.intraCellSpacing+b.width/2,x<z?(b.setGeneralPurposeVariable(l,z),p=!0):x<b.getGeneralPurposeVariable(l)-1&&(b.setGeneralPurposeVariable(l,x),p=!0)):z>x+1&&(m==d[l].length-1?(b.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m+1],x=m.getGeneralPurposeVariable(l),x=x-m.width/2-this.intraCellSpacing-b.width/2,x>z?(b.setGeneralPurposeVariable(l,
+z),p=!0):x>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,x),p=!0)));if(p){for(b=0;b<k.length;b++)l=k[b],l=f.get(l),null!=l&&0==l.visited&&(l.visited=!0,c.push(l));for(b=0;b<n.length;b++)l=n[b],l=f.get(l),null!=l&&0==l.visited&&(l.visited=!0,c.push(l))}g.visited=!1;e++}};mxCoordinateAssignment.prototype.medianPos=function(a,c){if(0==a%2)for(var f=c.maxRank;0<f;f--)this.rankMedianPosition(f-1,c,f);else for(f=0;f<c.maxRank-1;f++)this.rankMedianPosition(f+1,c,f)};
mxCoordinateAssignment.prototype.rankMedianPosition=function(a,c,f){c=c.ranks[a];for(var d=[],b={},e=0;e<c.length;e++){var g=c[e];d[e]=new WeightedCellSorter;d[e].cell=g;d[e].rankIndex=e;b[g.id]=d[e];var k;k=f<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[e].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(e=0;e<d.length;e++){var l,g=d[e].cell;l=0;k=f<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
null!=k&&(l=k.length,l=0<l?this.medianXValue(k,f):g.getGeneralPurposeVariable(a));var m=0;k=-1E8;for(var n=d[e].rankIndex-1;0<=n;){var p=b[c[n].id];if(null!=p){var q=p.cell;p.visited?(k=q.getGeneralPurposeVariable(a)+q.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=q.width+this.intraCellSpacing,n--)}}m=0;q=1E8;for(n=d[e].rankIndex+1;n<d.length;)if(p=b[c[n].id],null!=p){var t=p.cell;p.visited?(q=t.getGeneralPurposeVariable(a)-t.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=t.width+
this.intraCellSpacing,n++)}l>=k&&l<=q?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>q&&(g.setGeneralPurposeVariable(a,q),this.currentXDelta+=l-q);d[e].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,c){for(var f=0,d=0;d<c.length;d++){var b=c[d];a.isVertex()&&b.isVertex()?f++:f=a.isEdge()&&b.isEdge()?f+8:f+2}return f};
@@ -895,9 +895,9 @@ mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var c=0;c<a
u;if(t.isVertex()){u=0==k?b.connectsAsSource:b.connectsAsTarget;for(var v=0;v<u.length;v++)if(u[v].source==t||u[v].target==t)e+=u[v].edges.length,q++,g.push(u[v])}else e+=t.edges.length,q++,g.push(t)}b.width>(e+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/e;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=0;m<g.length;m++)for(q=g[m].edges.length,t=this.jettyPositions[g[m].ids[0]],null==t&&(t=[],this.jettyPositions[g[m].ids[0]]=t),m<e/2?
p+=this.prefVertEdgeOff:m>e/2&&(p-=this.prefVertEdgeOff),u=0;u<q;u++)t[4*u+2*k]=n,n+=l,t[4*u+2*k+1]=p}e=b.getNextLayerConnectedCells(c);g=c+1}}};
mxCoordinateAssignment.prototype.setEdgePosition=function(a){var c=0;if(101207!=a.temp[0]){var f=a.maxRank,d=a.minRank;f==d&&(f=a.source.maxRank,d=a.target.minRank);for(var b=0,e=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),q=[],t=a.isReversed;p!=g&&(t=!t);if(null!=e){var u=t?
-2:0,v=t?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[f]:this.rankBottomY[f],x=e[4*b+1+u];t!=l&&(x=-x);var v=v+x,u=e[4*b+u],y=k.model.getTerminal(n,!0);this.layout.isPort(y)&&k.model.getParent(y)==p&&(u=k.view.getState(y),u=null!=u?u.x:p.geometry.x+a.source.width*y.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(u,v)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u,v+x))):(q.push(new mxPoint(v,
-u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(v+x,u)))}u=a.x.length-1;v=x=-1;p=a.maxRank-1;for(t&&(u=0,x=a.x.length,v=1,p=a.minRank+1);a.maxRank!=a.minRank&&u!=x;u+=v){var y=a.x[u]+c,A=(this.rankTopY[p]+this.rankBottomY[p+1])/2,B=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(t)var z=A,A=B,B=z;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(y,A)),q.push(new mxPoint(y,B))):(q.push(new mxPoint(A,y)),q.push(new mxPoint(B,
-y)));this.limitX=Math.max(this.limitX,y);p+=v}null!=e&&(u=t?2:0,v=t?l?this.rankTopY[f]:this.rankBottomY[f]:l?this.rankBottomY[d]:this.rankTopY[d],x=e[4*b+3-u],t!=l&&(x=-x),v-=x,u=e[4*b+2-u],t=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(t)&&k.model.getParent(t)==p&&(u=k.view.getState(t),u=null!=u?u.x:p.geometry.x+a.target.width*t.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+2:0,v=t?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[f]:this.rankBottomY[f],x=e[4*b+1+u];t!=l&&(x=-x);var v=v+x,u=e[4*b+u],z=k.model.getTerminal(n,!0);this.layout.isPort(z)&&k.model.getParent(z)==p&&(u=k.view.getState(z),u=null!=u?u.x:p.geometry.x+a.source.width*z.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(u,v)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u,v+x))):(q.push(new mxPoint(v,
+u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(v+x,u)))}u=a.x.length-1;v=x=-1;p=a.maxRank-1;for(t&&(u=0,x=a.x.length,v=1,p=a.minRank+1);a.maxRank!=a.minRank&&u!=x;u+=v){var z=a.x[u]+c,y=(this.rankTopY[p]+this.rankBottomY[p+1])/2,B=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(t)var A=y,y=B,B=A;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(z,y)),q.push(new mxPoint(z,B))):(q.push(new mxPoint(y,z)),q.push(new mxPoint(B,
+z)));this.limitX=Math.max(this.limitX,z);p+=v}null!=e&&(u=t?2:0,v=t?l?this.rankTopY[f]:this.rankBottomY[f]:l?this.rankBottomY[d]:this.rankTopY[d],x=e[4*b+3-u],t!=l&&(x=-x),v-=x,u=e[4*b+2-u],t=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(t)&&k.model.getParent(t)==p&&(u=k.view.getState(t),u=null!=u?u.x:p.geometry.x+a.target.width*t.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
q.push(new mxPoint(u,v-x)),q.push(new mxPoint(u,v))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(v-x,u)),q.push(new mxPoint(v,u))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);c=0==c?this.parallelEdgeSpacing:0<c?-c:-c+this.parallelEdgeSpacing;b++}a.temp[0]=101207}};
mxCoordinateAssignment.prototype.setVertexLocation=function(a){var c=a.cell,f=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(c,f,d):this.layout.setVertexLocation(c,d,f);this.limitX=Math.max(this.limitX,f+a.width)};
mxCoordinateAssignment.prototype.processReversedEdge=function(a,c){};function WeightedCellSorter(a,c){this.cell=a;this.weightedValue=c}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,c){return null!=a&&null!=c?c.weightedValue>a.weightedValue?-1:c.weightedValue<a.weightedValue?1:c.nudge?-1:1:0};
@@ -1019,10 +1019,10 @@ mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.targetWindow=null;mxP
mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--\x3e');return a};mxPrintPreview.prototype.appendGraph=function(a,c,f,d,b,e){this.graph=a;this.scale=null!=c?c:1/a.pageScale;this.x0=f;this.y0=d;this.open(null,null,b,e)};
mxPrintPreview.prototype.open=function(a,c,f,d){var b=this.graph.cellRenderer.initializeOverlay,e=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(b,a){a.init(b.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(b,a,d,c){a.dialect=b.view.graph.dialect;a.init(b.view.getDrawPane())});this.wnd=null!=c?c:this.wnd;var g=!1;null==this.wnd&&(g=!0,this.wnd=window.open());var k=this.wnd.document;if(g){var l=this.getDoctype();null!=l&&0<l.length&&
k.writeln(l);mxClient.IS_VML?k.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):("CSS1Compat"===document.compatMode&&k.writeln("<!DOCTYPE html>"),k.writeln("<html>"));k.writeln("<head>");this.writeHead(k,a);k.writeln("</head>");k.writeln('<body class="mxPage">')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-=
-q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var t=this.pageFormat.width-2*this.border,u=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var v=Math.max(1,Math.ceil((m.width+this.x0)/t)),x=Math.max(1,Math.ceil((m.height+this.y0)/u));this.pageCount=v*x;var y=mxUtils.bind(this,function(){if(this.pageSelector&&(1<x||1<v)){var b=this.createPageSelector(x,v);k.body.appendChild(b);if(mxClient.IS_IE&&null==k.documentMode||
-5==k.documentMode||8==k.documentMode||7==k.documentMode){b.style.position="absolute";var a=function(){b.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(b){a()});mxEvent.addListener(this.wnd,"resize",function(b){a()})}}}),A=mxUtils.bind(this,function(b,a){null!=this.borderColor&&(b.style.borderColor=this.borderColor,b.style.borderStyle="solid",b.style.borderWidth="1px");b.style.background=this.backgroundColor;if(f||a)b.style.pageBreakAfter=
-"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),k.body.appendChild(b));(f||a)&&this.addPageBreak(k)}),B=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=B)for(var z=0;z<B.length;z++)A(B[z],!0);for(var C=this.getAppendices(this.pageFormat.width,this.pageFormat.height),z=0;z<x;z++){var E=z*u/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<v;a++){if(null==this.wnd)return null;
-var F=a*t/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,D=z*v+a+1,K=new mxRectangle(F,E,t,u),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-F,-E,this.scale,D,b,K);this.printBackgroundImage&&this.insertBackgroundImage(b,-F,-E)}),D);e.setAttribute("id","mxPage-"+D);A(e,null!=C||z<x-1||a<v-1)}}if(null!=C)for(z=0;z<C.length;z++)A(C[z],z<C.length-1);g&&!d&&(this.closeDocument(),y());this.wnd.focus()}catch(H){null!=e&&null!=e.parentNode&&
+q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var t=this.pageFormat.width-2*this.border,u=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var v=Math.max(1,Math.ceil((m.width+this.x0)/t)),x=Math.max(1,Math.ceil((m.height+this.y0)/u));this.pageCount=v*x;var z=mxUtils.bind(this,function(){if(this.pageSelector&&(1<x||1<v)){var b=this.createPageSelector(x,v);k.body.appendChild(b);if(mxClient.IS_IE&&null==k.documentMode||
+5==k.documentMode||8==k.documentMode||7==k.documentMode){b.style.position="absolute";var a=function(){b.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(b){a()});mxEvent.addListener(this.wnd,"resize",function(b){a()})}}}),y=mxUtils.bind(this,function(b,a){null!=this.borderColor&&(b.style.borderColor=this.borderColor,b.style.borderStyle="solid",b.style.borderWidth="1px");b.style.background=this.backgroundColor;if(f||a)b.style.pageBreakAfter=
+"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),k.body.appendChild(b));(f||a)&&this.addPageBreak(k)}),B=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=B)for(var A=0;A<B.length;A++)y(B[A],!0);for(var C=this.getAppendices(this.pageFormat.width,this.pageFormat.height),A=0;A<x;A++){var E=A*u/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<v;a++){if(null==this.wnd)return null;
+var F=a*t/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,D=A*v+a+1,K=new mxRectangle(F,E,t,u),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-F,-E,this.scale,D,b,K);this.printBackgroundImage&&this.insertBackgroundImage(b,-F,-E)}),D);e.setAttribute("id","mxPage-"+D);y(e,null!=C||A<x-1||a<v-1)}}if(null!=C)for(A=0;A<C.length;A++)y(C[A],A<C.length-1);g&&!d&&(this.closeDocument(),z());this.wnd.focus()}catch(H){null!=e&&null!=e.parentNode&&
e.parentNode.removeChild(e)}finally{this.graph.cellRenderer.initializeOverlay=b}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var c=a.createElement("hr");c.className="mxPageBreak";a.body.appendChild(c)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("</body>");a.writeln("</html>");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,c){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=c&&a.writeln(c);a.writeln("</style>")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1033,8 +1033,8 @@ mxPrintPreview.prototype.renderPage=function(a,c,f,d,b,e){e=this.wnd.document;va
c-2*this.border+"px",l.style.overflow="hidden",!mxClient.IS_IE||null!=e.documentMode&&5!=e.documentMode&&8!=e.documentMode&&7!=e.documentMode?(l.style.top=this.border+"px",l.style.left=this.border+"px"):(l.style.marginTop=this.border+"px",l.style.marginLeft=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(l.style.position="absolute"),g.appendChild(l),document.body.appendChild(g),k=l}catch(n){throw g.parentNode.removeChild(g),n;}b(k);return g};
mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
mxPrintPreview.prototype.addGraphFragment=function(a,c,f,d,b,e){var g=this.graph.getView();d=this.graph.container;this.graph.container=b;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,
-c);var u=this.graph.cellRenderer.redraw,v=g.states;a=g.scale;if(this.clipping){var x=new mxRectangle((e.x+t.x)*a,(e.y+t.y)*a,e.width*a/f,e.height*a/f);this.graph.cellRenderer.redraw=function(b,a,d){if(null!=b){var c=v.get(b.cell);if(null!=c&&(c=g.getBoundingBox(c,!1),null!=c&&!mxUtils.intersects(x,c)))return}u.apply(this,arguments)}}a=null;try{var y=[this.getRoot()];a=new mxTemporaryCellStates(g,f,y)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
-"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=e.width+"px",g.canvas.style.height=e.height+"px";else for(f=b.firstChild;null!=f;)y=f.nextSibling,c=f.nodeName.toLowerCase(),"svg"==c?(f.style.overflow="hidden",f.style.position="relative",f.style.top=this.marginTop+"px",f.setAttribute("width",e.width),f.setAttribute("height",e.height),f.style.width="",f.style.height=""):"default"!=f.style.cursor&&"div"!=c&&f.parentNode.removeChild(f),f=y;this.printBackgroundImage&&(b=b.getElementsByTagName("svg"),
+c);var u=this.graph.cellRenderer.redraw,v=g.states;a=g.scale;if(this.clipping){var x=new mxRectangle((e.x+t.x)*a,(e.y+t.y)*a,e.width*a/f,e.height*a/f);this.graph.cellRenderer.redraw=function(b,a,d){if(null!=b){var c=v.get(b.cell);if(null!=c&&(c=g.getBoundingBox(c,!1),null!=c&&!mxUtils.intersects(x,c)))return}u.apply(this,arguments)}}a=null;try{var z=[this.getRoot()];a=new mxTemporaryCellStates(g,f,z)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
+"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=e.width+"px",g.canvas.style.height=e.height+"px";else for(f=b.firstChild;null!=f;)z=f.nextSibling,c=f.nodeName.toLowerCase(),"svg"==c?(f.style.overflow="hidden",f.style.position="relative",f.style.top=this.marginTop+"px",f.setAttribute("width",e.width),f.setAttribute("height",e.height),f.style.width="",f.style.height=""):"default"!=f.style.cursor&&"div"!=c&&f.parentNode.removeChild(f),f=z;this.printBackgroundImage&&(b=b.getElementsByTagName("svg"),
0<b.length&&(b[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(q);this.graph.container=d;this.graph.cellRenderer.redraw=u;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=t;a.destroy();g.setEventsEnabled(p)}};
mxPrintPreview.prototype.insertBackgroundImage=function(a,c,f){var d=this.graph.backgroundImage;if(null!=d){var b=document.createElement("img");b.style.position="absolute";b.style.marginLeft=Math.round(c*this.scale)+"px";b.style.marginTop=Math.round(f*this.scale)+"px";b.setAttribute("width",Math.round(this.scale*d.width));b.setAttribute("height",Math.round(this.scale*d.height));b.src=d.src;a.insertBefore(b,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
@@ -1149,25 +1149,25 @@ c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&
d.y)||mxUtils.contains(c,a,d.y)||b.push(new mxPoint(a,d.y)):(e=Math.max(c.y,f.y),b.push(new mxPoint(a,e+(Math.min(c.y+c.height,f.y+f.height)-e)/2)))))},TopToBottom:function(a,c,f,d,b){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=e.transformControlPoint(a,d));null!=k&&(c=new mxCellState,c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&(k=Math.max(c.y,f.y),g=Math.min(c.y+c.height,f.y+f.height),a=e.getRoutingCenterX(c),
null!=d&&d.x>=c.x&&d.x<=c.x+c.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(f,a,k)||mxUtils.contains(c,a,k)||b.push(new mxPoint(a,k)),a=null!=d&&d.x>=f.x&&d.x<=f.x+f.width?d.x:e.getRoutingCenterX(f),mxUtils.contains(f,a,k)||mxUtils.contains(c,a,k)||b.push(new mxPoint(a,k)),1==b.length&&(null!=d&&1==b.length?mxUtils.contains(f,d.x,k)||mxUtils.contains(c,d.x,k)||b.push(new mxPoint(d.x,k)):(e=Math.max(c.x,f.x),b.push(new mxPoint(e+(Math.min(c.x+c.width,f.x+f.width)-e)/2,k)))))},
SegmentConnector:function(a,c,f,d,b){function e(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)b.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<b.length?b[0]:null,m=!0,n=null,p=g[0];null==p&&null!=c?p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var q=g.length-1;if(null!=d&&0<d.length){for(var n=[],t=0;t<d.length;t++){var u=a.view.transformControlPoint(a,d[t]);null!=u&&(u.x=
-Math.round(u.x),u.y=Math.round(u.y),n.push(u))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));u=g[q];null!=u&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-u.x)<k&&(d[d.length-1].x=u.x),Math.abs(d[d.length-1].y-u.y)<k&&(d[d.length-1].y=u.y));var n=d[0],v=c,x=g[0],y=!1,A=!1,y=n;null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),v=null);for(t=0;2>t;t++){var B=null!=x&&x.x==y.x,z=null!=x&&x.y==y.y,C=null!=v&&y.y>=v.y&&y.y<=v.y+
-v.height,v=null!=v&&y.x>=v.x&&y.x<=v.x+v.width,y=z||null==x&&C,A=B||null==x&&v;if(0!=t||!(y&&A||B&&z)){if(null!=x&&!z&&!B&&(C||v)){m=C?!1:!0;break}if(A||y){m=y;1==t&&(m=0==d.length%2?y:A);break}}v=f;x=g[q];null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),v=null);y=d[d.length-1];B&&z&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&e(new mxPoint(n.x,
+Math.round(u.x),u.y=Math.round(u.y),n.push(u))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));u=g[q];null!=u&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-u.x)<k&&(d[d.length-1].x=u.x),Math.abs(d[d.length-1].y-u.y)<k&&(d[d.length-1].y=u.y));var n=d[0],v=c,x=g[0],z=!1,y=!1,z=n;null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),v=null);for(t=0;2>t;t++){var B=null!=x&&x.x==z.x,A=null!=x&&x.y==z.y,C=null!=v&&z.y>=v.y&&z.y<=v.y+
+v.height,v=null!=v&&z.x>=v.x&&z.x<=v.x+v.width,z=A||null==x&&C,y=B||null==x&&v;if(0!=t||!(z&&y||B&&A)){if(null!=x&&!A&&!B&&(C||v)){m=C?!1:!0;break}if(y||z){m=z;1==t&&(m=0==d.length%2?z:y);break}}v=f;x=g[q];null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),v=null);z=d[d.length-1];B&&A&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&e(new mxPoint(n.x,
p.y));m?p.y=n.y:p.x=n.x;for(t=0;t<d.length;t++)m=!m,n=d[t],m?p.y=n.y:p.x=n.x,e(p.clone())}else n=p,m=!0;p=g[q];null==p&&null!=f&&(p=new mxPoint(a.view.getRoutingCenterX(f),a.view.getRoutingCenterY(f)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[q]&&g[q].y!=n.y||null==g[q]&&null!=f&&(n.y<f.y||n.y>f.y+f.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=f&&(n.x<f.x||n.x>f.x+f.width))&&e(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=c)for(;1<
b.length&&null!=b[1]&&mxUtils.contains(c,b[1].x,b[1].y);)b.splice(1,1);if(null==g[q]&&null!=f)for(;1<b.length&&null!=b[b.length-1]&&mxUtils.contains(f,b[b.length-1].x,b[b.length-1].y);)b.splice(b.length-1,1);null!=u&&null!=b[b.length-1]&&Math.abs(u.x-b[b.length-1].x)<k&&Math.abs(u.y-b[b.length-1].y)<k&&(b.splice(b.length-1,1),null!=b[b.length-1]&&(Math.abs(b[b.length-1].x-u.x)<k&&(b[b.length-1].x=u.x),Math.abs(b[b.length-1].y-u.y)<k&&(b[b.length-1].y=u.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,c,f,d,b){c=mxUtils.getValue(a.style,b?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==c&&(mxUtils.getValue(a.style,b?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,b?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),c=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
-mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},OrthConnector:function(a,c,f,d,b){var e=a.view.graph,g=null==c?!1:e.getModel().isEdge(c.cell),k=null==f?!1:e.getModel().isEdge(f.cell),e=a.absolutePoints,l=e[0],m=e[e.length-1],n=null!=c?c.x:l.x,p=null!=c?c.y:l.y,q=null!=c?c.width:0,t=null!=c?c.height:0,u=null!=f?f.x:m.x,v=null!=f?f.y:m.y,x=null!=f?f.width:0,y=null!=f?f.height:0,e=a.view.scale*mxEdgeStyle.getJettySize(a,c,f,d,!0),A=a.view.scale*mxEdgeStyle.getJettySize(a,
-c,f,d,!1);null!=c&&f==c&&(e=A=Math.max(e,A));var B=A+e,z=!1;if(null!=l&&null!=m)var z=m.x-l.x,C=m.y-l.y,z=z*z+C*C<B*B;if(z||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,c,f,d,b);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=c&&(d[0]=mxUtils.getPortConstraints(c,a,!0,mxConstants.DIRECTION_MASK_ALL),z=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=z&&(z=mxUtils.getBoundingBox(new mxRectangle(n,p,q,t),z),n=z.x,p=z.y,
-q=z.width,t=z.height));null!=f&&(d[1]=mxUtils.getPortConstraints(f,a,!1,mxConstants.DIRECTION_MASK_ALL),z=mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0),0!=z&&(z=mxUtils.getBoundingBox(new mxRectangle(u,v,x,y),z),u=z.x,v=z.y,x=z.width,y=z.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;x=Math.round(10*x)/10;y=Math.round(10*y)/10;a=[0,0];n=[[n,p,q,t],[u,v,x,y]];A=[e,A];for(z=0;2>z;z++)mxEdgeStyle.limits[z][1]=
-n[z][0]-A[z],mxEdgeStyle.limits[z][2]=n[z][1]-A[z],mxEdgeStyle.limits[z][4]=n[z][0]+n[z][2]+A[z],mxEdgeStyle.limits[z][8]=n[z][1]+n[z][3]+A[z];A=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;z=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);C=A-p;A=0;0>z?A=0>C?2:1:0>=C&&(A=3,0==z&&(A=2));p=null;null!=c&&(p=l);c=[[.5,.5],[.5,.5]];for(z=0;2>z;z++)null!=p&&(c[z][0]=(p.x-n[z][0])/n[z][2],1>=Math.abs(p.x-n[z][0])?a[z]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[z][0]-n[z][2])&&(a[z]=mxConstants.DIRECTION_MASK_EAST),
-c[z][1]=(p.y-n[z][1])/n[z][3],1>=Math.abs(p.y-n[z][1])?a[z]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[z][1]-n[z][3])&&(a[z]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=m);z=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-B,0);mxEdgeStyle.vertexSeperations[2]=Math.max(z-B,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-B,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-B,0);B=[];
-f=[];l=[];f[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=z>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=z>=p?z:p;q=[[0,0],[0,0]];t=!1;for(z=0;2>z;z++)0==a[z]&&(0==(f[z]&d[z])&&(f[z]=mxUtils.reversePortConstraints(f[z])),0==(l[z]&d[z])&&(l[z]=mxUtils.reversePortConstraints(l[z])),q[z][0]=l[z],q[z][1]=f[z]);0<p&&0<m&&(0<(f[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
-f[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=f[1],t=!0):0<(l[0]&d[0])&&0<(f[1]&d[1])&&(q[0][0]=l[0],q[0][1]=f[0],q[1][0]=f[1],q[1][1]=l[1],t=!0));0<p&&!t&&(q[0][0]=l[0],q[0][1]=f[0],q[1][0]=l[1],q[1][1]=f[1],t=!0);0<m&&!t&&(q[0][0]=f[0],q[0][1]=l[0],q[1][0]=f[1],q[1][1]=l[1]);for(z=0;2>z;z++)0==a[z]&&(0==(q[z][0]&d[z])&&(q[z][0]=q[z][1]),B[z]=q[z][0]&d[z],B[z]|=(q[z][1]&d[z])<<8,B[z]|=(q[1-z][z]&d[z])<<16,B[z]|=(q[1-z][1-z]&d[z])<<24,0==(B[z]&15)&&(B[z]<<=8),0==(B[z]&3840)&&(B[z]=B[z]&15|B[z]>>8),0==(B[z]&
-983040)&&(B[z]=B[z]&65535|(B[z]&251658240)>>8),a[z]=B[z]&15,d[z]==mxConstants.DIRECTION_MASK_WEST||d[z]==mxConstants.DIRECTION_MASK_NORTH||d[z]==mxConstants.DIRECTION_MASK_EAST||d[z]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[z]=d[z]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];B=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=A;B-=A;1>d&&(d+=4);1>B&&(B+=4);d=mxEdgeStyle.routePatterns[d-1][B-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},OrthConnector:function(a,c,f,d,b){var e=a.view.graph,g=null==c?!1:e.getModel().isEdge(c.cell),k=null==f?!1:e.getModel().isEdge(f.cell),e=a.absolutePoints,l=e[0],m=e[e.length-1],n=null!=c?c.x:l.x,p=null!=c?c.y:l.y,q=null!=c?c.width:0,t=null!=c?c.height:0,u=null!=f?f.x:m.x,v=null!=f?f.y:m.y,x=null!=f?f.width:0,z=null!=f?f.height:0,e=a.view.scale*mxEdgeStyle.getJettySize(a,c,f,d,!0),y=a.view.scale*mxEdgeStyle.getJettySize(a,
+c,f,d,!1);null!=c&&f==c&&(e=y=Math.max(e,y));var B=y+e,A=!1;if(null!=l&&null!=m)var A=m.x-l.x,C=m.y-l.y,A=A*A+C*C<B*B;if(A||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,c,f,d,b);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=c&&(d[0]=mxUtils.getPortConstraints(c,a,!0,mxConstants.DIRECTION_MASK_ALL),A=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=A&&(A=mxUtils.getBoundingBox(new mxRectangle(n,p,q,t),A),n=A.x,p=A.y,
+q=A.width,t=A.height));null!=f&&(d[1]=mxUtils.getPortConstraints(f,a,!1,mxConstants.DIRECTION_MASK_ALL),A=mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0),0!=A&&(A=mxUtils.getBoundingBox(new mxRectangle(u,v,x,z),A),u=A.x,v=A.y,x=A.width,z=A.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;x=Math.round(10*x)/10;z=Math.round(10*z)/10;a=[0,0];n=[[n,p,q,t],[u,v,x,z]];y=[e,y];for(A=0;2>A;A++)mxEdgeStyle.limits[A][1]=
+n[A][0]-y[A],mxEdgeStyle.limits[A][2]=n[A][1]-y[A],mxEdgeStyle.limits[A][4]=n[A][0]+n[A][2]+y[A],mxEdgeStyle.limits[A][8]=n[A][1]+n[A][3]+y[A];y=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;A=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);C=y-p;y=0;0>A?y=0>C?2:1:0>=C&&(y=3,0==A&&(y=2));p=null;null!=c&&(p=l);c=[[.5,.5],[.5,.5]];for(A=0;2>A;A++)null!=p&&(c[A][0]=(p.x-n[A][0])/n[A][2],1>=Math.abs(p.x-n[A][0])?a[A]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[A][0]-n[A][2])&&(a[A]=mxConstants.DIRECTION_MASK_EAST),
+c[A][1]=(p.y-n[A][1])/n[A][3],1>=Math.abs(p.y-n[A][1])?a[A]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[A][1]-n[A][3])&&(a[A]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=m);A=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-B,0);mxEdgeStyle.vertexSeperations[2]=Math.max(A-B,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-B,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-B,0);B=[];
+f=[];l=[];f[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=A>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=A>=p?A:p;q=[[0,0],[0,0]];t=!1;for(A=0;2>A;A++)0==a[A]&&(0==(f[A]&d[A])&&(f[A]=mxUtils.reversePortConstraints(f[A])),0==(l[A]&d[A])&&(l[A]=mxUtils.reversePortConstraints(l[A])),q[A][0]=l[A],q[A][1]=f[A]);0<p&&0<m&&(0<(f[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
+f[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=f[1],t=!0):0<(l[0]&d[0])&&0<(f[1]&d[1])&&(q[0][0]=l[0],q[0][1]=f[0],q[1][0]=f[1],q[1][1]=l[1],t=!0));0<p&&!t&&(q[0][0]=l[0],q[0][1]=f[0],q[1][0]=l[1],q[1][1]=f[1],t=!0);0<m&&!t&&(q[0][0]=f[0],q[0][1]=l[0],q[1][0]=f[1],q[1][1]=l[1]);for(A=0;2>A;A++)0==a[A]&&(0==(q[A][0]&d[A])&&(q[A][0]=q[A][1]),B[A]=q[A][0]&d[A],B[A]|=(q[A][1]&d[A])<<8,B[A]|=(q[1-A][A]&d[A])<<16,B[A]|=(q[1-A][1-A]&d[A])<<24,0==(B[A]&15)&&(B[A]<<=8),0==(B[A]&3840)&&(B[A]=B[A]&15|B[A]>>8),0==(B[A]&
+983040)&&(B[A]=B[A]&65535|(B[A]&251658240)>>8),a[A]=B[A]&15,d[A]==mxConstants.DIRECTION_MASK_WEST||d[A]==mxConstants.DIRECTION_MASK_NORTH||d[A]==mxConstants.DIRECTION_MASK_EAST||d[A]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[A]=d[A]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];B=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=y;B-=y;1>d&&(d+=4);1>B&&(B+=4);d=mxEdgeStyle.routePatterns[d-1][B-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+e;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=e}e=0;f=B=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(z=0;z<d.length;z++)l=d[z]&15,t=l==mxConstants.DIRECTION_MASK_EAST?3:l,t+=A,4<t&&(t-=4),m=mxEdgeStyle.dirVectors[t-1],l=0<t%2?0:1,l!=B&&(e++,mxEdgeStyle.wayPoints1[e][0]=mxEdgeStyle.wayPoints1[e-1][0],mxEdgeStyle.wayPoints1[e][1]=mxEdgeStyle.wayPoints1[e-1][1]),u=0<(d[z]&mxEdgeStyle.TARGET_MASK),v=0<(d[z]&mxEdgeStyle.SOURCE_MASK),p=(d[z]&mxEdgeStyle.SIDE_MASK)>>5,p<<=A,15<p&&(p>>=4),q=0<(d[z]&mxEdgeStyle.CENTER_MASK),(v||u)&&9>p?(t=v?0:1,p=q&&0==l?n[t][0]+c[t][0]*n[t][2]:q?n[t][1]+c[t][1]*
-n[t][3]:mxEdgeStyle.limits[t][p],0==l?(p=(p-mxEdgeStyle.wayPoints1[e][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[e][0]+=m[0]*p)):(p=(p-mxEdgeStyle.wayPoints1[e][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[e][1]+=m[1]*p))):q&&(mxEdgeStyle.wayPoints1[e][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[t]/2),mxEdgeStyle.wayPoints1[e][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[t]/2)),0<e&&mxEdgeStyle.wayPoints1[e][l]==mxEdgeStyle.wayPoints1[e-1][l]?e--:B=l;for(z=0;z<=e&&(z!=e||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
-mxConstants.DIRECTION_MASK_WEST))?0:1)==f?0:1)==(e+1)%2);z++)b.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[z][0]),Math.round(mxEdgeStyle.wayPoints1[z][1])));for(a=1;a<b.length;)null==b[a-1]||null==b[a]||b[a-1].x!=b[a].x||b[a-1].y!=b[a].y?a++:b.splice(a,1)}},getRoutePattern:function(a,c,f,d){var b=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];b-=c;a-=c;1>b&&(b+=4);1>a&&(a+=4);c=routePatterns[b-1][a-1];0!=f&&0!=d||null==inlineRoutePatterns[b-1][a-
+0:1;for(A=0;A<d.length;A++)l=d[A]&15,t=l==mxConstants.DIRECTION_MASK_EAST?3:l,t+=y,4<t&&(t-=4),m=mxEdgeStyle.dirVectors[t-1],l=0<t%2?0:1,l!=B&&(e++,mxEdgeStyle.wayPoints1[e][0]=mxEdgeStyle.wayPoints1[e-1][0],mxEdgeStyle.wayPoints1[e][1]=mxEdgeStyle.wayPoints1[e-1][1]),u=0<(d[A]&mxEdgeStyle.TARGET_MASK),v=0<(d[A]&mxEdgeStyle.SOURCE_MASK),p=(d[A]&mxEdgeStyle.SIDE_MASK)>>5,p<<=y,15<p&&(p>>=4),q=0<(d[A]&mxEdgeStyle.CENTER_MASK),(v||u)&&9>p?(t=v?0:1,p=q&&0==l?n[t][0]+c[t][0]*n[t][2]:q?n[t][1]+c[t][1]*
+n[t][3]:mxEdgeStyle.limits[t][p],0==l?(p=(p-mxEdgeStyle.wayPoints1[e][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[e][0]+=m[0]*p)):(p=(p-mxEdgeStyle.wayPoints1[e][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[e][1]+=m[1]*p))):q&&(mxEdgeStyle.wayPoints1[e][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[t]/2),mxEdgeStyle.wayPoints1[e][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[t]/2)),0<e&&mxEdgeStyle.wayPoints1[e][l]==mxEdgeStyle.wayPoints1[e-1][l]?e--:B=l;for(A=0;A<=e&&(A!=e||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
+mxConstants.DIRECTION_MASK_WEST))?0:1)==f?0:1)==(e+1)%2);A++)b.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[A][0]),Math.round(mxEdgeStyle.wayPoints1[A][1])));for(a=1;a<b.length;)null==b[a-1]||null==b[a]||b[a-1].x!=b[a].x||b[a-1].y!=b[a].y?a++:b.splice(a,1)}},getRoutePattern:function(a,c,f,d){var b=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];b-=c;a-=c;1>b&&(b+=4);1>a&&(a+=4);c=routePatterns[b-1][a-1];0!=f&&0!=d||null==inlineRoutePatterns[b-1][a-
1]||(c=inlineRoutePatterns[b-1][a-1]);return c}},mxStyleRegistry={values:[],putValue:function(a,c){mxStyleRegistry.values[a]=c},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var c in mxStyleRegistry.values)if(mxStyleRegistry.values[c]==a)return c;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);
mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;
@@ -1925,7 +1925,7 @@ m=mxUtils.bind(this,function(){this.hideProperties()});d.addButtons(f,m);return
mxEditor.prototype.showTasks=function(){if(null==this.tasks){var a=document.createElement("div");a.style.padding="4px";a.style.paddingLeft="20px";var c=document.body.clientWidth,c=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,a,c-220,this.tasksTop,200);c.setClosable(!0);c.destroyOnClose=!1;var f=mxUtils.bind(this,function(d){mxEvent.release(a);a.innerHTML="";this.createTasks(a)});this.graph.getModel().addListener(mxEvent.CHANGE,f);this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
f);this.graph.addListener(mxEvent.ROOT,f);null!=this.tasksWindowImage&&c.setImage(this.tasksWindowImage);this.tasks=c;this.createTasks(a)}this.tasks.setVisible(!0)};mxEditor.prototype.refreshTasks=function(a){null!=this.tasks&&(a=this.tasks.content,mxEvent.release(a),a.innerHTML="",this.createTasks(a))};mxEditor.prototype.createTasks=function(a){};
mxEditor.prototype.showHelp=function(a){if(null==this.help){var c=document.createElement("iframe");c.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp);c.setAttribute("height","100%");c.setAttribute("width","100%");c.setAttribute("frameBorder","0");c.style.backgroundColor="white";a=document.body.clientWidth;var f=document.body.clientHeight||document.documentElement.clientHeight,d=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,c,(a-this.helpWidth)/2,(f-this.helpHeight)/
-3,this.helpWidth,this.helpHeight);d.setMaximizable(!0);d.setClosable(!0);d.destroyOnClose=!1;d.setResizable(!0);null!=this.helpWindowImage&&d.setImage(this.helpWindowImage);mxClient.IS_NS&&(a=function(a){c.setAttribute("height",d.div.offsetHeight-26+"px")},d.addListener(mxEvent.RESIZE_END,a),d.addListener(mxEvent.MAXIMIZE,a),d.addListener(mxEvent.NORMALIZE,a),d.addListener(mxEvent.SHOW,a));this.help=d}this.help.setVisible(!0)};
+3,this.helpWidth,this.helpHeight);d.setMaximizable(!0);d.setClosable(!0);d.destroyOnClose=!1;d.setResizable(!0);null!=this.helpWindowImage&&d.setImage(this.helpWindowImage);mxClient.IS_NS&&(a=function(b){c.setAttribute("height",d.div.offsetHeight-26+"px")},d.addListener(mxEvent.RESIZE_END,a),d.addListener(mxEvent.MAXIMIZE,a),d.addListener(mxEvent.NORMALIZE,a),d.addListener(mxEvent.SHOW,a));this.help=d}this.help.setVisible(!0)};
mxEditor.prototype.showOutline=function(){if(null==this.outline){var a=document.createElement("div");a.style.overflow="hidden";a.style.position="relative";a.style.width="100%";a.style.height="100%";a.style.background="white";a.style.cursor="move";8==document.documentMode&&(a.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=100)");var c=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,a,600,480,200,200,!1),f=new mxOutline(this.graph,a);c.setClosable(!0);c.setResizable(!0);
c.destroyOnClose=!1;c.addListener(mxEvent.RESIZE_END,function(){f.update()});this.outline=c;this.outline.outline=f}this.outline.setVisible(!0);this.outline.outline.update(!0)};mxEditor.prototype.setMode=function(a){"select"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==a&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))};
mxEditor.prototype.createPopupMenu=function(a,c,f){this.popupHandler.createMenu(this,a,c,f)};mxEditor.prototype.createEdge=function(a,c){var f;if(null!=this.defaultEdge)f=this.graph.getModel().cloneCell(this.defaultEdge);else{f=new mxCell("");f.setEdge(!0);var d=new mxGeometry;d.relative=!0;f.setGeometry(d)}d=this.getEdgeStyle();null!=d&&f.setStyle(d);return f};mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle};
@@ -1992,6 +1992,7 @@ Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYA
Editor.zoomOutLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABJklEQVQ4y4WT2XaDMAxEvWD2nSSUNEnTJN3r//+9Sj7ILAY6L0ijC4ONYVZRpo6cByrz2YKSUGorGTpz71lPVHvT+avoB5wIkU/mxk8veceSuNoLg44IzziXjvpih72wKQnm8yc2UoiP/LAd8jQfe2Xf4Pq+2EyYIvv9wbzHHCgwxDdlBtWZOdqDfTCVgqpygQpsZaojVAVc9UjQxnAJDIBhiQv84tq3gMQCAVTxVoSibXJf8tMuc7e1TB/DCmejBNg/w1Y3c+AM5vv4w7xM59/oXamrHaLVqPQ+OTCnmMZxgz0SdL5zji0/ld6j88qGa5KIiBB6WeJGKfUKwSMKLuXgvl1TW0tm5R9UQL/efSDYsnzxD8CinhBsTTdugJatKpJwf8v+ADb8QmvW7AeAAAAAAElFTkSuQmCC";
Editor.zoomInLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABKElEQVQ4y4WT6WKCMBCENwkBwn2oFKvWqr3L+79es4EkQIDOH2d3Pxk2ABiJlB8JCXjqw4LikHVGLHTm3nM3UeVN5690GBBN0GwyV/3kkrUQR+WeKnREeKpzaXWd77CmJiXGfPIEI4V4yQ9TIW/ntlcMBe731Vts9w5TWG8F5j3mQI4hvrKpdGeYA7CX9qAcl650gVJartxRuhyHVghF8idQAIbFLvCLu28BsQEC6aKtCK6Pyb3JT7PmbmtNH8Ny56CotD/2qOs5cJbuffxgXmCib+xddVU5RNOhkvvkhTlFehzVWCOh3++MYElOhfdovaImnRYVmqDdsuhNp1QrBBE6uGC2+3ZNjGdg5B94oD+9uyVgWT79BwAxEBTWdOu3bWBVgsn/N/AHUD9IC01Oe40AAAAASUVORK5CYII=";
Editor.actualSizeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABIUlEQVQ4y4WT2XqDIBCFBxDc9yTWNEnTJN3r+79eGT4BEbXnaubMr8dBBaM450dCQp4LWFAascGIRd48eB4cNYE7f6XjgGiCFs5c+dml6CFN6j1V6IQIlHPpdV/usKcmJcV88gQTRXjLD9Mhb+fWq8YG9/uCmTCFjeeDeY85UGKIUGUuqzN42kv7oCouq9oHamlzVR1lVfpAIu1QVRiW+sAv7r4FpAYIZZVsRXB9TP5Dfpo1d1trCgzz1iiptH/sUbdz4CzN9+mLeXHn3+hdddd4RDegsrvzwZwSs2GLPRJidAqCLTlVwaMPqpYMWjTWBB2WRW86pVkhSKyDK2bdt2tmagZG4sBD/evdLQHLEvQfAOKRoLCmG1FAB6uKmby+gz+REDn7O5+EwQAAAABJRU5ErkJggg==";
+Editor.printLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAXVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9RKvvlAAAAHnRSTlMAydnl77qbMLT093H7K4Nd4Ktn082+lYt5bkklEgP44nQSAAAApUlEQVQ4y73P2Q6DIBRF0cOgbRHHzhP//5m9mBAQKjG1cT0Yc7ITAMu1LNQgUZiQ2DYoNQ0sCQb6qgHAfRx48opq3J9AZ6xuF7uOew8Ik1OsCZRS2UAC9V+D9a+QZYxNA45YFQftPtSkATOhw7dAc0vPBwKWiIOjP0JZ0yMuQJ27g36DipOUsqRAM0dR8KD1/ILHaHSE/w8DIx09E3g/BTce6rHUB5sAPKvfF+JdAAAAAElFTkSuQmCC";
Editor.layersLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAmVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v7///+bnZkkAAAAMnRSTlMABPr8ByiD88KsTi/rvJb272mjeUA1CuPe1M/KjVxYHxMP6KZ0S9nYzGRGGRaznpGIbzaGUf0AAAHESURBVDjLbZLZYoIwEEVDgLCjbKIgAlqXqt3m/z+uNwu1rcyDhjl3ktnYL7OY254C0VX3yWFZfzDrOClbbgKxi0YDHjwl4jbnRkXxJS/C1YP3DbBhD1n7Ex4uaAqdVDb3yJ/4J/3nJD2to/ngQz/DfUvzMp4JJ5sSCaF5oXmemgQDfDxzbi+Kq4sU+vNcuAmx94JtyOP2DD4Epz2asWSCz4Z/4fECxyNj9zC9xNLHcdPEO+awDKeSaUu0W4twZQiO2hYVisTR3RCtK/c1X6t4xMEpiGqXqVntEBLolkZZsKY4QtwH6jzq67dEHlJysB1aNOD3XT7n1UkasQN59L4yC2RELMDSeCRtz3yV22Ub3ozIUTknYx8JWqDdQxbUes98cR2kZtUSveF/bAhcedwEWmlxIkpZUy4XOCb6VBjjxHvbwo/1lBAHHi2JCr0NI570QhyHq/DhJoE2lLgyA4RVe6KmZ47O/3b86MCP0HWa73A8/C3SUc5Qc1ajt6fgpXJ+RGpMvDSchepZDOOQRcZVIKcK90x2D7etqtI+56+u6n3sPriO6nfphitR4+O2m3EbM7lh3me1FM1o+LMI887rN+s3/wZdTFlpNVJiOAAAAABJRU5ErkJggg==";
Editor.closeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAUVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////8IN+deAAAAGnRSTlMAuvAIg/dDM/QlOeuFhj0S5s4vKgzjxJRQNiLSey0AAADNSURBVDjLfZLbEoMgDEQjRRRs1XqX///QNmOHJSnjPkHOGR7IEmeoGtJZstnwjqbRfIsmgEdtPCqe9Ynz7ZSc07rE2QiSc+qv8TvjRXA2PDUm3dpe82iJhOEUfxJJo3aCv+jKmRmH4lcCjCjeh9GWOdL/GZZkXH3PYYDrHBnfc4D/RVZf5sjoC1was+Y6HQxwaUxFvq/a0Pv343VCTxfBSRiB+ab3M3eiQZXmMNBJ3Y8pGRZtYQ7DgHMXJEdPLTaN/qBjzJOBc3nmNcbsA16bMR0oLqf+AAAAAElFTkSuQmCC";
Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAgMAAAAOFJJnAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAgJsrThgAAABcSURBVBjThc6xDcAgDATAd8MQTEPW8TRUmYCGnzLRYyOlIV+dZFtvkICTFGqiJEzAG0/Uje9oL+e5Vu4F5yUYJxxqGKhQZ0eBvmgwYQLQaARKD1hbiPyDR0QOeAC31EyNe5X/kAAAAABJRU5ErkJggg==";Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFZJREFUOMvdkskRgDAMA4lDwg2B7b9XOlge/KKvdsa25KFb5XlRvxXC/DNBEv8IFNjBgGdDgXtFgTyhwDXiQAUHCvwa4Uv6mR6UR+1led2mVonvl+tML45qCQNQLIx7AAAAAElFTkSuQmCC";
@@ -2013,6 +2014,43 @@ a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.backg
Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,b){c.undoableEditHappened(b.getProperty("edit"))};var f=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,b){for(var c=a.getSelectionCellsForChanges(b.getProperty("edit").changes),f=a.getModel(),k=[],l=0;l<c.length;l++)(f.isVertex(c[l])||f.isEdge(c[l]))&&null!=a.view.getState(c[l])&&
k.push(c[l]);a.setSelectionCells(k)};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};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,c,f,d,b,e,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);f+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(1,Math.round((document.body.scrollWidth-f-64)/2)),n=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
+l.style.width=f+"px";l.style.height=d+"px";l.style.left=m+"px";l.style.top=n+"px";l.style.zIndex=this.zIndex;null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.left="0px",this.bg.style.top="0px",this.bg.style.bottom="0px",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));b&&document.body.appendChild(this.bg);l.appendChild(c);
+document.body.appendChild(l);e&&(c=document.createElement("img"),c.setAttribute("src",Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("close")),c.className="geDialogClose",c.style.top=n+14+"px",c.style.left=m+f+38-k+"px",c.style.zIndex=this.zIndex,mxEvent.addListener(c,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(c),this.dialogImg=c,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.onDialogClose=
+g;this.container=l;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+
+"/clear.gif";
+Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
+"/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);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,c){this.create(a,c)};
+PrintDialog.prototype.create=function(a){function c(a){var b=k.checked||m.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,e=1/f.pageScale;if(b){var g=k.checked?1:parseInt(n.value);isNaN(g)||(e=mxUtils.getScaleForPageCount(g,f,c))}f.getGraphBounds();var l=g=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);e*=d;!b&&f.pageVisible?(d=f.getPageLayout(),g-=d.x*c.width,l-=d.y*c.height):
+b=!0;b=PrintDialog.createPrintPreview(f,e,c,0,g,l,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,b,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");b=document.createElement("td");b.setAttribute("colspan","2");b.style.fontSize="10pt";b.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("fitPage"));
+b.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(a)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(b);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");b=document.createElement("td");b.style.fontSize="10pt";b.appendChild(m);l=document.createElement("span");mxUtils.write(l," "+mxResources.get("posterPrint")+":");b.appendChild(l);mxEvent.addListener(l,
+"click",function(a){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(a)});d.appendChild(b);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";b=document.createElement("td");b.style.fontSize="10pt";b.appendChild(n);mxUtils.write(b," "+mxResources.get("pages")+" (max)");d.appendChild(b);g.appendChild(d);mxEvent.addListener(m,"change",
+function(){m.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);b=document.createElement("td");mxUtils.write(b,mxResources.get("pageScale")+":");d.appendChild(b);b=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";b.appendChild(p);d.appendChild(b);g.appendChild(d);d=document.createElement("tr");b=document.createElement("td");b.colSpan=2;
+b.style.paddingTop="20px";b.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&b.appendChild(l);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});q.className="geBtn";b.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||
+b.appendChild(l);d.appendChild(b);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}};
+PrintDialog.createPrintPreview=function(a,c,f,d,b,e,g){c=new mxPrintPreview(a,c,f,d,b,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=g;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var k=c.writeHead;c.writeHead=function(a){k.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 c};
+PrintDialog.previewEnabled=!0;
+var PageSetupDialog=function(a){function c(){null==n||n==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=n,m.style.backgroundImage="")}function f(){null==t?(q.removeAttribute("title"),q.style.fontSize="",q.innerHTML=mxResources.get("change")+"..."):(q.setAttribute("title",t.src),q.style.fontSize="11px",q.innerHTML=t.src.substring(0,42)+"...")}var d=a.editor.graph,b,e,g=document.createElement("table");g.style.width=
+"100%";g.style.height="100%";var k=document.createElement("tbody");b=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");b.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var l=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",d.pageFormat);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");
+mxUtils.write(e,mxResources.get("background")+":");b.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="18px";m.style.height="18px";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var n=d.background;c();mxEvent.addListener(m,"click",function(b){a.pickColor(n||"none",function(a){n=a;c()});mxEvent.consume(b)});
+e.appendChild(m);mxUtils.write(e,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();e.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?d.getGridSize():a)});b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
+":");b.appendChild(e);e=document.createElement("td");var q=document.createElement("a");q.style.textDecoration="underline";q.style.cursor="pointer";q.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(q,"click",function(b){a.showBackgroundImageDialog(function(a){t=a;f()});mxEvent.consume(b)});f();e.appendChild(q);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var u=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&e.appendChild(u);var v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=n&&a.setBackgroundColor(n);d.backgroundImage!==t&&a.setBackgroundImage(t);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(u);b.appendChild(e);k.appendChild(b);g.appendChild(k);
+this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function b(a,b,d){if(d||p!=document.activeElement&&q!=document.activeElement){a=!1;for(b=0;b<u.length;b++)d=u[b],y?"custom"==d.key&&(k.value=d.key,y=!1):null!=d.format&&(f.width==d.format.width&&f.height==d.format.height?(k.value=d.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,a=!0):f.width==d.format.height&&f.height==d.format.width&&(k.value=d.key,e.removeAttribute("checked"),
+e.defaultChecked=!1,e.checked=!1,g.setAttribute("checked","checked"),g.defaultChecked=!0,a=g.checked=!0));a?(l.style.display="",n.style.display="none"):(p.value=f.width,q.value=f.height,z.setAttribute("selected","selected"),e.setAttribute("checked","checked"),e.defaultChecked=!0,l.style.display="none",n.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var g=document.createElement("input");
+g.setAttribute("name",c);g.setAttribute("type","radio");g.setAttribute("value","landscape");var k=document.createElement("select");k.style.marginBottom="8px";k.style.width="202px";var l=document.createElement("div");l.style.marginLeft="4px";l.style.width="210px";l.style.height="24px";e.style.marginRight="6px";l.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));l.appendChild(c);g.style.marginLeft="10px";g.style.marginRight="6px";l.appendChild(g);
+var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));l.appendChild(m);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var p=document.createElement("input");p.setAttribute("size","6");p.setAttribute("value",f.width);n.appendChild(p);mxUtils.write(n," x ");var q=document.createElement("input");q.setAttribute("size","6");q.setAttribute("value",f.height);n.appendChild(q);mxUtils.write(n," pt");
+l.style.display="none";n.style.display="none";for(var t={},u=PageSetupDialog.getFormats(),v=0;v<u.length;v++){var x=u[v];t[x.key]=x;var z=document.createElement("option");z.setAttribute("value",x.key);mxUtils.write(z,x.title);k.appendChild(z)}var y=!1;b();a.appendChild(k);mxUtils.br(a);a.appendChild(l);a.appendChild(n);var B=f,A=function(){var a=t[k.value];null!=a.format?(p.value=a.format.width,q.value=a.format.height,n.style.display="none",l.style.display=""):(l.style.display="none",n.style.display=
+"");a=new mxRectangle(0,0,parseInt(p.value),parseInt(q.value));"custom"!=k.value&&g.checked&&(a=new mxRectangle(0,0,a.height,a.width));if(a.width!=B.width||a.height!=B.height)B=a,null!=d&&d(B)};mxEvent.addListener(c,"click",function(a){e.checked=!0;A();mxEvent.consume(a)});mxEvent.addListener(m,"click",function(a){g.checked=!0;A();mxEvent.consume(a)});mxEvent.addListener(p,"blur",A);mxEvent.addListener(p,"click",A);mxEvent.addListener(q,"blur",A);mxEvent.addListener(q,"click",A);mxEvent.addListener(g,
+"change",A);mxEvent.addListener(e,"change",A);mxEvent.addListener(k,"change",function(){y="custom"==k.value;A()});A();return{set:function(a){f=a;b(null,null,!0)},get:function(){return B},widthInput:p,heightInput:q}};
+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:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1652)},{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,584,826)},{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 b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),d.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,d),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(b){a.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),
mxUtils.bind(this,function(b){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
@@ -2021,7 +2059,7 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=e,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],e=1;e<this.gridSteps;e++){var f=e*b;c.push("M 0 "+f+" L "+d+" "+f+" M "+f+" 0 L "+f+" "+d)}return'<svg width="'+d+'" height="'+d+'" xmlns="'+
mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" 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,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=this.view.canvas;null!=
c.ownerSVGElement&&(c=c.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";c.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,e=this.view.translate,f=this.pageFormat,g=c*this.pageScale,k=this.view.getBackgroundPageBounds();b=k.width;d=k.height;var l=new mxRectangle(c*e.x,c*
-e.y,f.width*g,f.height*g),m=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(d/l.height)-1:0,y=a?Math.ceil(b/l.width)-1:0,A=k.x+b,B=k.y+d;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<y&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?m:y,d=0;d<=b;d++){var c=a==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),Math.round(k.y+(d+1)*l.height)),new mxPoint(Math.round(A),
+e.y,f.width*g,f.height*g),m=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(d/l.height)-1:0,z=a?Math.ceil(b/l.width)-1:0,y=k.x+b,B=k.y+d;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?m:z,d=0;d<=b;d++){var c=a==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),Math.round(k.y+(d+1)*l.height)),new mxPoint(Math.round(y),
Math.round(k.y+(d+1)*l.height))]:[new mxPoint(Math.round(k.x+(d+1)*l.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(d+1)*l.width),Math.round(B))];null!=a[d]?(a[d].points=c,a[d].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),a[d]=c)}for(d=b;d<a.length;d++)a[d].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 e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var f=this.graph.getCellGeometry(b[e]);if(null!=f&&f.relative)return!1}return c.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,d){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,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,e=this.graph.pageScale,f=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,b)/f),g=Math.floor(Math.min(0,d)/c);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+
@@ -2039,13 +2077,13 @@ function(a){return k.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxE
if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=a;n=c;p=b}}),t=this,u=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){u.apply(this,arguments);q();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;
if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=t.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));t.toolbar.setFontName(c);t.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var v=d.cellEditor.stopEditing;
d.cellEditor.stopEditing=function(a,b){v.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var x=d.fireMouseEvent;d.fireMouseEvent=function(a,b,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();x.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,d){this.menus.createPopupMenu(a,b,d)}));
-mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var y="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),A="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
+mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var z="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
e.push(f));f=d.getModel().getStyle(b.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],m=l.indexOf("=");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle=d.defaultVertexStyle;this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]))};var B=["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],B,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)y.push(C[a][c]);for(a=0;a<A.length;a++)y.push(A[a]);var E=function(a,b){d.getModel().beginUpdate();
-try{if(b)for(var c=d.getModel().isEdge(k),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var g=e[c[f]];null!=g&&d.setCellStyles(c[f],g,a)}else for(g=0;g<a.length;g++){for(var k=a[g],l=d.getModel().getStyle(k),m=null!=l?l.split(";"):[],n=y.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var v=p.substring(0,q),t=mxUtils.indexOf(n,v);0<=t&&n.splice(t,1);for(var u=0;u<C.length;u++){var x=C[u];if(0<=mxUtils.indexOf(x,v))for(var B=
-0;B<x.length;B++){var z=mxUtils.indexOf(n,x[B]);0<=z&&n.splice(z,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var v=n[f],D=e[v];null==D||"shape"==v&&!c||(!c||0>mxUtils.indexOf(A,v))&&d.setCellStyles(v,D,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
+"keys",[],"values",[],"cells",[]))};var B=["fontFamily","fontSize","fontColor"],A="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],B,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)z.push(C[a][c]);for(a=0;a<y.length;a++)z.push(y[a]);var E=function(a,b){d.getModel().beginUpdate();
+try{if(b)for(var c=d.getModel().isEdge(k),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var g=e[c[f]];null!=g&&d.setCellStyles(c[f],g,a)}else for(g=0;g<a.length;g++){for(var k=a[g],l=d.getModel().getStyle(k),m=null!=l?l.split(";"):[],n=z.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var v=p.substring(0,q),t=mxUtils.indexOf(n,v);0<=t&&n.splice(t,1);for(var u=0;u<C.length;u++){var x=C[u];if(0<=mxUtils.indexOf(x,v))for(var A=
+0;A<x.length;A++){var B=mxUtils.indexOf(n,x[A]);0<=B&&n.splice(B,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var v=n[f],D=e[v];null==D||"shape"==v&&!c||(!c||0>mxUtils.indexOf(y,v))&&d.setCellStyles(v,D,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
b){var d=[b.getProperty("cell")];b.getProperty("terminalInserted")&&d.push(b.getProperty("terminal"));E(d)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var g=0;g<c.length&&(e=d.getModel().isVertex(c[g])||e,!(f=d.getModel().isEdge(c[g])||f)||!e);g++);else f=e=!0;for(var c=b.getProperty("keys"),k=b.getProperty("values"),g=0;g<c.length;g++){var l=0<=mxUtils.indexOf(B,c[g]);if("strokeColor"!=c[g]||null!=k[g]&&"none"!=k[g])if(0<=
-mxUtils.indexOf(A,c[g]))f||0<=mxUtils.indexOf(z,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(y,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(y,c[g])){if(e||l)null==k[g]?delete d.currentVertexStyle[c[g]]:d.currentVertexStyle[c[g]]=k[g];if(f||l||0<=mxUtils.indexOf(z,c[g]))null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+mxUtils.indexOf(y,c[g]))f||0<=mxUtils.indexOf(A,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(z,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(z,c[g])){if(e||l)null==k[g]?delete d.currentVertexStyle[c[g]]:d.currentVertexStyle[c[g]]=k[g];if(f||l||0<=mxUtils.indexOf(A,c[g]))null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]}}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=
@@ -2070,24 +2108,24 @@ EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.g
a.width*b.width,this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,d){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,d){if(null!=a.container){var c=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=a.view.translate,f=a.view.scale,c=mxRectangle.fromRectangle(c);c.x=c.x/f-e.x;c.y=c.y/f-e.y;c.width/=f;c.height/=f;var e=
a.container.scrollTop,g=a.container.scrollLeft,k=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)k+=3;var l=a.container.offsetWidth-k,m=b?Math.max(.3,Math.min(d||1,l/c.width)):f;a.view.scaleAndTranslate(m,Math.max((l-m*c.width)/2,0)/m-c.x,Math.max((a.container.offsetHeight-k-m*c.height)/4,0)/m-c.y);a.container.scrollTop=e*m/f;a.container.scrollLeft=g*m/f}});var f=mxUtils.bind(this,function(){c(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",f)});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)};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%";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 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):
+"#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 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",d);d();var b=0,d=mxUtils.bind(this,function(a,d,c){b++;var e=document.createElement("span");e.style.paddingLeft="8px";e.style.paddingRight="8px";e.style.cursor="pointer";mxEvent.addListener(e,"click",a);null!=c&&e.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);e.appendChild(a);this.chromelessToolbar.appendChild(e);return e}),e=d(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();
-mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")||"Previous Page"),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")||"Next Page"),l=mxUtils.bind(this,function(){null!=
-this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});e.style.paddingLeft="0px";e.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",e.style.display="",g.style.display="inline-block"):(k.style.display="none",e.style.display="none",g.style.display=
-"none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,(mxResources.get("zoomOut")||"Zoom Out")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,(mxResources.get("zoomIn")||"Zoom In")+" (Alt+Mousewheel)");d(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")||"Fit");var n=null,p=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),t=mxUtils.bind(this,
-function(a){null!=n&&(window.clearTimeout(n),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 u=d(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 d=u.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=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),v=a.getModel();v.addListener(mxEvent.CHANGE,function(){u.style.display=1<v.getChildCount(v.root)?"":"none"})}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")||"Open in New Window");a.lightbox&&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")||
-"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*b+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||t(30),q())}));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)?q():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():t(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||t(30)}));var x=a.getTolerance(),y=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();
-this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<x&&Math.abs(this.scrollTop-a.container.scrollTop)<x&&Math.abs(this.startX-d.getGraphX())<x&&Math.abs(this.startY-d.getGraphY())<x&&(0<parseFloat(y.chromelessToolbar.style.opacity||0)?q():t(30))}})}else if(this.editor.extendCanvas){var A=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}A.apply(this,arguments)};var B=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),d=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*d.x+b.width*c.width),f=Math.ceil(2*d.y+b.height*c.height),g=a.minimumGraphSize;if(null==
+mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&
+null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});e.style.paddingLeft="0px";e.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",e.style.display="",g.style.display="inline-block"):(k.style.display="none",e.style.display="none",g.style.display="none");l()});this.editor.addListener("resetGraphView",
+m);this.editor.addListener("pageSelected",l);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(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 n=null,p=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),t=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),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 u=d(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 d=u.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=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),v=a.getModel();v.addListener(mxEvent.CHANGE,function(){u.style.display=1<v.getChildCount(v.root)?"":"none"})}d(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"));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&&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);this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||t(30),q())}));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)?q():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():t(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||t(30)}));var x=a.getTolerance(),z=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<x&&Math.abs(this.scrollTop-a.container.scrollTop)<x&&Math.abs(this.startX-d.getGraphX())<x&&Math.abs(this.startY-d.getGraphY())<x&&(0<parseFloat(z.chromelessToolbar.style.opacity||0)?q():t(30))}})}else if(this.editor.extendCanvas){var y=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}y.apply(this,arguments)};var B=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),d=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*d.x+b.width*c.width),f=Math.ceil(2*d.y+b.height*c.height),g=a.minimumGraphSize;if(null==
g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=d.x-b.x*c.width;d=d.y-b.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==d?B.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(e,d),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((d-c)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
-1;var z=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!=z&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-z.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/
-2-z.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,d){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var c=mxEvent.getSource(b);null!=c;){if(c==a.container){z=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(d);mxEvent.consume(b);
+1;var A=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!=A&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-A.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/
+2-A.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,d){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var c=mxEvent.getSource(b);null!=c;){if(c==a.container){A=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(d);mxEvent.consume(b);
break}c=c.parentNode}}))};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(){this.editor.graph.maxFitScale=2;this.editor.graph.fit(60);this.editor.graph.maxFitScale=null};EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.chromeless)return this.onBeforeUnload()})};
@@ -2301,8 +2339,8 @@ Sidebar.prototype.createDropHandler=function(a,c,f,d){f=null!=f?f:!0;return mxUt
(n=b.importCells(a,k,l,g));if(null!=b.layoutManager){var q=b.layoutManager.getLayout(g);if(null!=q){var t=b.view.scale,u=b.view.translate,v=(k+u.x)*t,x=(l+u.y)*t;for(g=0;g<n.length;g++)q.moveCell(n[g],v,x)}}f&&b.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{b.model.endUpdate()}null!=n&&0<n.length&&(b.scrollCellToVisible(n[0]),b.setSelectionCells(n))}}mxEvent.consume(e)}})};
Sidebar.prototype.createDragPreview=function(a,c){var f=document.createElement("div");f.style.border="1px dashed black";f.style.width=a+"px";f.style.height=c+"px";return f};
Sidebar.prototype.dropAndConnect=function(a,c,f,d){var b=this.getDropAndConnectGeometry(a,c[d],f,c),e=[];if(null!=b){var g=this.editorUi.editor.graph;g.model.beginUpdate();try{var k=g.getCellGeometry(a),l=g.getCellGeometry(c[d]),m=g.model.getParent(a),n=!0;if(null!=g.layoutManager){var p=g.layoutManager.getLayout(m);if(null!=p&&p.constructor==mxStackLayout&&(n=!1,e=g.view.getState(m),null!=e)){var q=new mxPoint(e.x/g.view.scale-g.view.translate.x,e.y/g.view.scale-g.view.translate.y);b.x+=q.x;b.y+=
-q.y;var t=b.getTerminalPoint(!1);null!=t&&(t.x+=q.x,t.y+=q.y)}}var u=l.x,v=l.y;g.model.isEdge(c[d])&&(v=u=0);var x=g.model.isEdge(a)||null!=k&&!k.relative&&n,e=c=g.importCells(c,b.x-(x?u:0),b.y-(x?v:0),x?m:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[d],f==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[d])){g.model.setTerminal(c[d],a,!0);var y=g.getCellGeometry(c[d]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(b.getTerminalPoint(!1),!1);else if(x&&g.model.isVertex(m)){var A=
-g.view.getState(m),q=new mxPoint(A.x/g.view.scale-g.view.translate.x,A.y/g.view.scale-g.view.translate.y);g.cellsMoved(c,q.x,q.y,null,null,!0)}}else l=g.getCellGeometry(c[d]),u=b.x-Math.round(l.x),v=b.y-Math.round(l.y),b.x=Math.round(l.x),b.y=Math.round(l.y),g.model.setGeometry(c[d],b),g.cellsMoved(c,u,v,null,null,!0),e=c.slice(),c.push(g.insertEdge(null,null,"",a,c[d],g.createCurrentEdgeStyle()));g.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{g.model.endUpdate()}}return e};
+q.y;var t=b.getTerminalPoint(!1);null!=t&&(t.x+=q.x,t.y+=q.y)}}var u=l.x,v=l.y;g.model.isEdge(c[d])&&(v=u=0);var x=g.model.isEdge(a)||null!=k&&!k.relative&&n,e=c=g.importCells(c,b.x-(x?u:0),b.y-(x?v:0),x?m:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[d],f==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[d])){g.model.setTerminal(c[d],a,!0);var z=g.getCellGeometry(c[d]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(b.getTerminalPoint(!1),!1);else if(x&&g.model.isVertex(m)){var y=
+g.view.getState(m),q=new mxPoint(y.x/g.view.scale-g.view.translate.x,y.y/g.view.scale-g.view.translate.y);g.cellsMoved(c,q.x,q.y,null,null,!0)}}else l=g.getCellGeometry(c[d]),u=b.x-Math.round(l.x),v=b.y-Math.round(l.y),b.x=Math.round(l.x),b.y=Math.round(l.y),g.model.setGeometry(c[d],b),g.cellsMoved(c,u,v,null,null,!0),e=c.slice(),c.push(g.insertEdge(null,null,"",a,c[d],g.createCurrentEdgeStyle()));g.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{g.model.endUpdate()}}return e};
Sidebar.prototype.getDropAndConnectGeometry=function(a,c,f,d){var b=this.editorUi.editor.graph,e=b.view,g=1<d.length,k=b.getCellGeometry(a);d=b.getCellGeometry(c);null!=k&&null!=d&&(d=d.clone(),b.model.isEdge(a)?(a=b.view.getState(a),k=a.absolutePoints,c=k[0],b=k[k.length-1],f==mxConstants.DIRECTION_NORTH?(d.x=c.x/e.scale-e.translate.x-d.width/2,d.y=c.y/e.scale-e.translate.y-d.height/2):(d.x=b.x/e.scale-e.translate.x-d.width/2,d.y=b.y/e.scale-e.translate.y-d.height/2)):(k.relative&&(a=b.view.getState(a),
k=k.clone(),k.x=(a.x-e.translate.x)/e.scale,k.y=(a.y-e.translate.y)/e.scale),e=b.defaultEdgeLength,b.model.isEdge(c)&&null!=d.getTerminalPoint(!0)&&null!=d.getTerminalPoint(!1)?(c=d.getTerminalPoint(!0),b=d.getTerminalPoint(!1),e=b.x-c.x,c=b.y-c.y,e=Math.sqrt(e*e+c*c),d.x=k.getCenterX(),d.y=k.getCenterY(),d.width=1,d.height=1,f==mxConstants.DIRECTION_NORTH?(d.height=e,d.y=k.y-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1)):f==mxConstants.DIRECTION_EAST?(d.width=e,d.x=k.x+k.width,d.setTerminalPoint(new mxPoint(d.x+
d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=k.y+k.height,d.setTerminalPoint(new mxPoint(d.x,d.y+d.height),!1)):f==mxConstants.DIRECTION_WEST&&(d.width=e,d.x=k.x-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1))):(!g&&45<d.width&&45<d.height&&45<k.width&&45<k.height&&(d.width*=k.height/d.height,d.height=k.height),d.x=k.x+k.width/2-d.width/2,d.y=k.y+k.height/2-d.height/2,f==mxConstants.DIRECTION_NORTH?d.y=d.y-k.height/2-d.height/2-e:f==mxConstants.DIRECTION_EAST?d.x=d.x+k.width/2+
@@ -2310,26 +2348,26 @@ d.width/2+e:f==mxConstants.DIRECTION_SOUTH?d.y=d.y+k.height/2+d.height/2+e:f==mx
2):f==mxConstants.DIRECTION_WEST&&(d.x-=k.getCenterX()+k.width/2,d.y-=k.getCenterY()))))));return d};
Sidebar.prototype.createDragSource=function(a,c,f,d,b){function e(a,b){var d;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(d=document.createElement(mxClient.VML_PREFIX+":image"),d.setAttribute("src",a.src),d.style.borderStyle="none"):(d=document.createElement("div"),d.style.backgroundImage="url("+a.src+")",d.style.backgroundPosition="center",d.style.backgroundRepeat="no-repeat"),d.style.width=a.width+4+"px",d.style.height=a.height+4+"px",d.style.display=mxClient.IS_QUIRKS?
"inline":"inline-block"):(d=mxUtils.createImage(a.src),d.style.width=a.width+"px",d.style.height=a.height+"px");null!=b&&d.setAttribute("title",b);mxUtils.setOpacity(d,a==this.refreshTarget?30:20);d.style.position="absolute";d.style.cursor="crosshair";return d}function g(a,b,d,c){null!=c.parentNode&&(mxUtils.contains(d,a,b)?(mxUtils.setOpacity(c,100),I=c):mxUtils.setOpacity(c,c==F?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,m=null,n=null,p=this,q=0;q<d.length&&(null==n&&this.editorUi.editor.graph.model.isVertex(d[q])?
-n=q:null==m&&this.editorUi.editor.graph.model.isEdge(d[q])&&null==this.editorUi.editor.graph.model.getTerminal(d[q],!0)&&(m=q),null==n||null==m);q++);var t=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,b,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=y&&I==F){var k=a.isCellSelected(y.cell)?a.getSelectionCells():[y.cell],k=this.updateShapes(a.model.isEdge(y.cell)?d[0]:d[n],k);a.setSelectionCells(k)}else null!=d&&null!=I&&null!=
+n=q:null==m&&this.editorUi.editor.graph.model.isEdge(d[q])&&null==this.editorUi.editor.graph.model.getTerminal(d[q],!0)&&(m=q),null==n||null==m);q++);var t=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,b,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=z&&I==F){var k=a.isCellSelected(z.cell)?a.getSelectionCells():[z.cell],k=this.updateShapes(a.model.isEdge(z.cell)?d[0]:d[n],k);a.setSelectionCells(k)}else null!=d&&null!=I&&null!=
v&&I!=F?(k=a.model.isEdge(v.cell)||null==m?n:m,a.setSelectionCells(this.dropAndConnect(v.cell,d,J,k))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),f,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){t.isActive()&&t.reset()});var u=t.mouseDown;t.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(l.stopEditing(),u.apply(this,
-arguments))};var v=null,x=null,y=null,A=!1,B=e(this.triangleUp,mxResources.get("connect")),z=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),E=e(this.triangleLeft,mxResources.get("connect")),F=e(this.refreshTarget,mxResources.get("replace")),D=null,K=e(this.roundDrop),H=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,I=null,L=t.createPreviewElement;t.createPreviewElement=function(a){var b=L.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
+arguments))};var v=null,x=null,z=null,y=!1,B=e(this.triangleUp,mxResources.get("connect")),A=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),E=e(this.triangleLeft,mxResources.get("connect")),F=e(this.refreshTarget,mxResources.get("replace")),D=null,K=e(this.roundDrop),H=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,I=null,L=t.createPreviewElement;t.createPreviewElement=function(a){var b=L.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var M=t.dragEnter;t.dragEnter=function(a,b){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");M.apply(this,arguments)};var Q=t.dragExit;t.dragExit=function(a,b){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");Q.apply(this,arguments)};t.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=I&&this.currentGuide.hide();if(null!=this.previewElement){var e=
-a.view;if(null!=y&&I==F)this.previewElement.style.display=a.model.isEdge(y.cell)?"none":"",this.previewElement.style.left=y.x+"px",this.previewElement.style.top=y.y+"px",this.previewElement.style.width=y.width+"px",this.previewElement.style.height=y.height+"px";else if(null!=v&&null!=I){var f=a.model.isEdge(v.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(v.cell,d[f],J,d),k=a.model.isEdge(v.cell)?null:a.getCellGeometry(v.cell),l=a.getCellGeometry(d[f]),q=a.model.getParent(v.cell),u=e.translate.x*
+a.view;if(null!=z&&I==F)this.previewElement.style.display=a.model.isEdge(z.cell)?"none":"",this.previewElement.style.left=z.x+"px",this.previewElement.style.top=z.y+"px",this.previewElement.style.width=z.width+"px",this.previewElement.style.height=z.height+"px";else if(null!=v&&null!=I){var f=a.model.isEdge(v.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(v.cell,d[f],J,d),k=a.model.isEdge(v.cell)?null:a.getCellGeometry(v.cell),l=a.getCellGeometry(d[f]),q=a.model.getParent(v.cell),u=e.translate.x*
e.scale,x=e.translate.y*e.scale;null!=k&&!k.relative&&a.model.isVertex(q)&&(x=e.getState(q),u=x.x,x=x.y);k=l.x;l=l.y;a.model.isEdge(d[f])&&(l=k=0);this.previewElement.style.left=(g.x-k)*e.scale+u+"px";this.previewElement.style.top=(g.y-l)*e.scale+x+"px";1==d.length&&(this.previewElement.style.width=g.width*e.scale+"px",this.previewElement.style.height=g.height*e.scale+"px");this.previewElement.style.display=""}else null!=t.currentHighlight.state&&a.model.isEdge(t.currentHighlight.state.cell)?(this.previewElement.style.left=
-Math.round(parseInt(this.previewElement.style.left)-b.width*e.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-b.height*e.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var W=(new Date).getTime(),O=0,G=null,X=this.editorUi.editor.graph.getCellStyle(d[0]);t.getDropTarget=mxUtils.bind(this,function(a,b,c,e){var f=mxEvent.isAltDown(e)||
-null==d?null:a.getCellAt(b,c);if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}a.isCellLocked(f)&&(f=null);var l=a.view.getState(f),k=I=null;G!=l?(G=l,W=(new Date).getTime(),O=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(G=l,t.getDropTarget(a,b,c,e))},this.dropTargetDelay+10))):O=(new Date).getTime()-
-W;if(2500>O&&null!=l&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(X,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(X,mxConstants.STYLE_SHAPE)||1500<O||a.model.isEdge(l.cell))&&O>this.dropTargetDelay&&(a.model.isVertex(l.cell)&&null!=n||a.model.isEdge(l.cell)&&a.model.isEdge(d[0]))){y=l;var m=a.model.isEdge(l.cell)?a.view.getPoint(l):new mxPoint(l.getCenterX(),
-l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);F.style.left=Math.floor(m.x)+"px";F.style.top=Math.floor(m.y)+"px";null==D&&(a.container.appendChild(F),D=F.parentNode);g(b,c,m,F)}else null==y||!mxUtils.contains(y,b,c)||1500<O&&!mxEvent.isShiftDown(e)?(y=null,null!=D&&(F.parentNode.removeChild(F),D=null)):null!=y&&null!=D&&(m=a.model.isEdge(y.cell)?a.view.getPoint(y):new mxPoint(y.getCenterX(),y.getCenterY()),
-m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(b,c,m,F));if(A&&null!=v&&!mxEvent.isAltDown(e)&&null==I){k=mxRectangle.fromRectangle(v);if(a.model.isEdge(v.cell)){var p=v.absolutePoints;null!=K.parentNode&&(m=p[0],k.add(g(b,c,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=H.parentNode&&(p=p[p.length-1],k.add(g(b,c,new mxRectangle(p.x-
+Math.round(parseInt(this.previewElement.style.left)-b.width*e.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-b.height*e.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var X=(new Date).getTime(),N=0,G=null,W=this.editorUi.editor.graph.getCellStyle(d[0]);t.getDropTarget=mxUtils.bind(this,function(a,b,c,e){var f=mxEvent.isAltDown(e)||
+null==d?null:a.getCellAt(b,c);if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}a.isCellLocked(f)&&(f=null);var l=a.view.getState(f),k=I=null;G!=l?(G=l,X=(new Date).getTime(),N=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(G=l,t.getDropTarget(a,b,c,e))},this.dropTargetDelay+10))):N=(new Date).getTime()-
+X;if(2500>N&&null!=l&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<N||a.model.isEdge(l.cell))&&N>this.dropTargetDelay&&(a.model.isVertex(l.cell)&&null!=n||a.model.isEdge(l.cell)&&a.model.isEdge(d[0]))){z=l;var m=a.model.isEdge(l.cell)?a.view.getPoint(l):new mxPoint(l.getCenterX(),
+l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);F.style.left=Math.floor(m.x)+"px";F.style.top=Math.floor(m.y)+"px";null==D&&(a.container.appendChild(F),D=F.parentNode);g(b,c,m,F)}else null==z||!mxUtils.contains(z,b,c)||1500<N&&!mxEvent.isShiftDown(e)?(z=null,null!=D&&(F.parentNode.removeChild(F),D=null)):null!=z&&null!=D&&(m=a.model.isEdge(z.cell)?a.view.getPoint(z):new mxPoint(z.getCenterX(),z.getCenterY()),
+m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(b,c,m,F));if(y&&null!=v&&!mxEvent.isAltDown(e)&&null==I){k=mxRectangle.fromRectangle(v);if(a.model.isEdge(v.cell)){var p=v.absolutePoints;null!=K.parentNode&&(m=p[0],k.add(g(b,c,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=H.parentNode&&(p=p[p.length-1],k.add(g(b,c,new mxRectangle(p.x-
this.roundDrop.width/2,p.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),H)))}else m=mxRectangle.fromRectangle(v),null!=v.shape&&null!=v.shape.boundingBox&&(m=mxRectangle.fromRectangle(v.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(v.cell),null!=p&&(m.x-=p.horizontalOffset/2,m.y-=p.verticalOffset/2,m.width+=p.horizontalOffset,m.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&
-"hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox&&m.add(p.rotationShape.boundingBox)),k.add(g(b,c,new mxRectangle(v.getCenterX()-this.triangleUp.width/2,m.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),B)),k.add(g(b,c,new mxRectangle(m.x+m.width,v.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),z)),k.add(g(b,c,new mxRectangle(v.getCenterX()-this.triangleDown.width/
-2,m.y+m.height,this.triangleDown.width,this.triangleDown.height),C)),k.add(g(b,c,new mxRectangle(m.x-this.triangleLeft.width,v.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),E));null!=k&&k.grow(10)}J=mxConstants.DIRECTION_NORTH;I==z?J=mxConstants.DIRECTION_EAST:I==C||I==H?J=mxConstants.DIRECTION_SOUTH:I==E&&(J=mxConstants.DIRECTION_WEST);null!=y&&I==F&&(l=y);m=(null==n||a.isCellConnectable(d[n]))&&(a.model.isEdge(f)&&null!=n||a.model.isVertex(f)&&a.isCellConnectable(f));
-if(null!=v&&5E3<=O||v!=l&&(null==k||!mxUtils.contains(k,b,c)||500<O&&null==I&&m))if(A=!1,v=5E3>O&&O>this.dropTargetDelay||a.model.isEdge(f)?l:null,null!=v&&m){k=[K,H,B,z,C,E];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);a.model.isEdge(f)?(p=l.absolutePoints,null!=p&&(m=p[0],p=p[p.length-1],k=a.tolerance,new mxRectangle(b-k,c-k,2*k,2*k),K.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(p.x-
+"hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox&&m.add(p.rotationShape.boundingBox)),k.add(g(b,c,new mxRectangle(v.getCenterX()-this.triangleUp.width/2,m.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),B)),k.add(g(b,c,new mxRectangle(m.x+m.width,v.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),A)),k.add(g(b,c,new mxRectangle(v.getCenterX()-this.triangleDown.width/
+2,m.y+m.height,this.triangleDown.width,this.triangleDown.height),C)),k.add(g(b,c,new mxRectangle(m.x-this.triangleLeft.width,v.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),E));null!=k&&k.grow(10)}J=mxConstants.DIRECTION_NORTH;I==A?J=mxConstants.DIRECTION_EAST:I==C||I==H?J=mxConstants.DIRECTION_SOUTH:I==E&&(J=mxConstants.DIRECTION_WEST);null!=z&&I==F&&(l=z);m=(null==n||a.isCellConnectable(d[n]))&&(a.model.isEdge(f)&&null!=n||a.model.isVertex(f)&&a.isCellConnectable(f));
+if(null!=v&&5E3<=N||v!=l&&(null==k||!mxUtils.contains(k,b,c)||500<N&&null==I&&m))if(y=!1,v=5E3>N&&N>this.dropTargetDelay||a.model.isEdge(f)?l:null,null!=v&&m){k=[K,H,B,A,C,E];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);a.model.isEdge(f)?(p=l.absolutePoints,null!=p&&(m=p[0],p=p[p.length-1],k=a.tolerance,new mxRectangle(b-k,c-k,2*k,2*k),K.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(p.x-
this.roundDrop.width/2)+"px",H.style.top=Math.floor(p.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(K),null==a.model.getTerminal(f,!1)&&a.container.appendChild(H))):(m=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(m=mxRectangle.fromRectangle(l.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(l.cell),null!=p&&(m.x-=p.horizontalOffset/2,m.y-=p.verticalOffset/
-2,m.width+=p.horizontalOffset,m.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&"hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox&&m.add(p.rotationShape.boundingBox)),B.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",B.style.top=Math.floor(m.y-this.triangleUp.height)+"px",z.style.left=Math.floor(m.x+m.width)+"px",z.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
-2)+"px",C.style.left=B.style.left,C.style.top=Math.floor(m.y+m.height)+"px",E.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",E.style.top=z.style.top,"eastwest"!=l.style.portConstraint&&(a.container.appendChild(B),a.container.appendChild(C)),a.container.appendChild(z),a.container.appendChild(E));null!=l&&(x=a.selectionCellsHandler.getHandler(l.cell),null!=x&&null!=x.setHandlesVisible&&x.setHandlesVisible(!1));A=!0}else for(k=[K,H,B,z,C,E],m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);
-A||null==x||x.setHandlesVisible(!0);f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=y&&I==F?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);k=a.getModel();if(null!=f&&(null!=I||!a.isSplitTarget(f,d,e))){for(;null!=f&&!a.isValidDropTarget(f,d,e)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||a.isCellLocked(f)||k.isEdge(f))f=null}return f});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var a=[K,H,F,B,z,C,E],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=v&&null!=x&&x.reset();I=D=y=v=x=null};return t};
+2,m.width+=p.horizontalOffset,m.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&"hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox&&m.add(p.rotationShape.boundingBox)),B.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",B.style.top=Math.floor(m.y-this.triangleUp.height)+"px",A.style.left=Math.floor(m.x+m.width)+"px",A.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
+2)+"px",C.style.left=B.style.left,C.style.top=Math.floor(m.y+m.height)+"px",E.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",E.style.top=A.style.top,"eastwest"!=l.style.portConstraint&&(a.container.appendChild(B),a.container.appendChild(C)),a.container.appendChild(A),a.container.appendChild(E));null!=l&&(x=a.selectionCellsHandler.getHandler(l.cell),null!=x&&null!=x.setHandlesVisible&&x.setHandlesVisible(!1));y=!0}else for(k=[K,H,B,A,C,E],m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);
+y||null==x||x.setHandlesVisible(!0);f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=z&&I==F?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);k=a.getModel();if(null!=f&&(null!=I||!a.isSplitTarget(f,d,e))){for(;null!=f&&!a.isValidDropTarget(f,d,e)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||a.isCellLocked(f)||k.isEdge(f))f=null}return f});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
+arguments);for(var a=[K,H,F,B,A,C,E],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=v&&null!=x&&x.reset();I=D=z=v=x=null};return t};
Sidebar.prototype.itemClicked=function(a,c,f,d){d=this.editorUi.editor.graph;if(mxEvent.isAltDown(f)){if(1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){c=null;for(var b=0;b<a.length&&null==c;b++)d.model.isVertex(a[b])&&(c=b);null!=c&&(d.setSelectionCells(this.dropAndConnect(d.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
c)),d.scrollCellToVisible(d.getSelectionCell()))}}else mxEvent.isShiftDown(f)?d.isSelectionEmpty()||(this.updateShapes(a[0],d.getSelectionCells()),d.scrollCellToVisible(d.getSelectionCell())):(a=d.getFreeInsertPoint(),c.drop(d,f,null,a.x,a.y),null!=this.editorUi.hoverIcons&&mxEvent.isTouchEvent(f)&&this.editorUi.hoverIcons.update(d.view.getState(d.getSelectionCell())))};
Sidebar.prototype.addClickHandler=function(a,c,f){var d=this.editorUi.editor.graph,b=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(a){e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))});c.mouseUp=mxUtils.bind(this,function(g){if(!mxEvent.isPopupTrigger(g)&&null==this.currentGraph&&null!=e){var k=d.tolerance;Math.abs(e.x-mxEvent.getClientX(g))<=k&&Math.abs(e.y-mxEvent.getClientY(g))<=k&&this.itemClicked(f,c,g,a)}b.apply(c,arguments);e=null;this.currentElt=a})};
@@ -2363,9 +2401,9 @@ function(){var a=n.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),d=[],c=0;c<b.length;c++){var e=this.graph.view.getState(b[c]),e=null!=e?e.style:this.graph.getCellStyle(b[c]);
"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[c]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&d.push(e)):d.push(b[c])}return d};this.connectionHandler.createTargetVertex=function(a,b){var d=this.graph.view.getState(b),d=null!=d?d.style:this.graph.getCellStyle(b);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(b),this.graph.model.isVertex(d)&&(b=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
this.getRubberband=function(){return p};var q=(new Date).getTime(),t=0,u=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;u.apply(this,arguments);a!=this.currentState?(q=(new Date).getTime(),t=0):t=(new Date).getTime()-q};var v=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<t||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&v.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var y=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return y.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var A=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(A=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=A)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var B=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return B.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};
-var z=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return z.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var d=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(d,b);return d};this.getAllCells=function(a,b,d,c,e,f){f=null!=f?f:[];if(0<d||0<c){var g=this.getModel(),k=a+d,l=b+c;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var m=g.getChildCount(e),n=0;n<m;n++){var p=
+"outlineConnect","1"))&&v.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var z=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return z.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(y=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=y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var B=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return B.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};
+var A=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return A.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var d=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(d,b);return d};this.getAllCells=function(a,b,d,c,e,f){f=null!=f?f:[];if(0<d||0<c){var g=this.getModel(),k=a+d,l=b+c;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var m=g.getChildCount(e),n=0;n<m;n++){var p=
g.getChildAt(e,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var v=mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(q=mxUtils.getBoundingBox(q,v));(g.isEdge(p)||g.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=k&&f.push(p);this.getAllCells(a,b,d,c,p,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,d){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 E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var d=b.getProperty("event").getState();E=null==d||this.isSelectionEmpty()||this.isCellSelected(d.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var d=b.getProperty("event"),c=b.getProperty("cell");null==c?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);E=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
@@ -2475,7 +2513,7 @@ Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),d=
"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 d=this.model.getParent(a);null!=d&&(d=this.layoutManager.getLayout(d),null!=d&&d.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(),d=[];b.beginUpdate();try{for(var c=0;c<a.length;c++){var e=a[c];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 k=b.getGeometry(e);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),m=k.getTerminalPoint(!1);
k.setTerminalPoint(l,!1);k.setTerminalPoint(m,!0);b.setGeometry(e,k);var n=this.view.getState(e),p=this.view.getState(f),q=this.view.getState(g);if(null!=n){var v=null!=p?this.getConnectionConstraint(n,p,!0):null,t=null!=q?this.getConnectionConstraint(n,q,!1):null;this.setConnectionConstraint(e,f,!0,t);this.setConnectionConstraint(e,g,!1,v)}d.push(e)}}else if(b.isVertex(e)&&(k=this.getCellGeometry(e),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var u=k.width;k.width=k.height;
-k.height=u;b.setGeometry(e,k);var x=this.view.getState(e);if(null!=x){var y=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==y?y="south":"south"==y?y="west":"west"==y?y="north":"north"==y&&(y="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,y,[e])}d.push(e)}}}finally{b.endUpdate()}return d};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);
+k.height=u;b.setGeometry(e,k);var x=this.view.getState(e);if(null!=x){var z=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==z?z="south":"south"==z?z="west":"west"==z?z="north":"north"==z&&(z="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,z,[e])}d.push(e)}}}finally{b.endUpdate()}return d};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 d=0;d<b.length;d++)this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,b,d){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 c=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,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=[],d=0;d<a.length;d++)if(this.isCellDeletable(a[d])){var c=this.view.getState(a[d]);if(null!=c){var e=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&
c==mxConstants.NONE&&b.push(a[d])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.setAttributeForCell=function(a,b,d){var c;null!=a.value&&"object"==typeof a.value?c=a.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",a.value||""));null!=d&&
@@ -2509,7 +2547,7 @@ d.innerHTML=a;a=document.createDocumentFragment();for(var c;c=d.firstChild;)last
if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var d=this.getCellAt(b.graphX,b.graphY);null!=d&&this.isSwimlane(d)&&this.hitsSwimlaneContent(d,b.graphX,b.graphY)||(b.state=this.view.getState(d),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,d=!1,c=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),
b=this.isCellSelected(f.getCell()),d=this.isSelectionEmpty(),c=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||!c&&!mxEvent.isMouseEvent(e.getEvent())&&(d&&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,d=sel.rangeCount;b<d;++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,d=a.length;b<d;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(da){}};var b=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));b.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,
+function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,d=a.length;b<d;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(ca){}};var b=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));b.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,
b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.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 d=this.graph.view.getState(a);this.textarea.className=null!=d&&1==d.style.html?"mxCellEditor geContentEditable":
"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var d=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(d)&&null!=c&&c.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 k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,d){d.originalNode=a;a=a.firstChild;for(var c=d.firstChild;null!=a&&null!=c;)b(a,c),a=a.nextSibling,c=c.nextSibling;return d}function d(a,b){if(null!=a)if(b.originalNode!=a)c(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?c(a):(d(a,b),b=b.nextSibling);a=e}}function c(a){for(var b=a.firstChild;null!=b;){var d=b.nextSibling;
@@ -2524,7 +2562,7 @@ mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.gra
mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.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=
"",l.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 d=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>"));return this.graph.sanitizeHtml(d,!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"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 m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(X){}};
+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"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 m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}};
var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(b||"")&&d==mxConstants.NONE&&c==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 p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,d,c,e,f){mxEvent.isAltDown(f)&&
(e=null);p.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 d=this.graph.view.translate,c=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/c-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/c-d.y);this.hint.innerHTML=b+", "+d;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
@@ -2551,11 +2589,11 @@ e,this.graph.getDefaultParent(),!0,!0),d=0;d<k.length;d++)if(this.graph.isCellMo
c=mxUtils.getOffset(this.graph.container);d.x-=c.x;d.y-=c.y;var c=b.getX()+d.x,d=b.getY()+d.y,e=this.first.x-c,f=this.first.y-d,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(c,d),this.isSpaceEvent(b)?(c=this.x+this.width,d=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=c-this.width),this.y<this.first.y&&(this.y=d-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 u=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);u.apply(this,arguments)};var v=(new Date).getTime(),x=0,y=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,d,c){y.apply(this,arguments);d!=this.currentTerminalState?(v=(new Date).getTime(),
-x=0):x=(new Date).getTime()-v;this.currentTerminalState=d};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.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 u=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);u.apply(this,arguments)};var v=(new Date).getTime(),x=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,d,c){z.apply(this,arguments);d!=this.currentTerminalState?(v=(new Date).getTime(),
+x=0):x=(new Date).getTime()-v;this.currentTerminalState=d};var y=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&y.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
function(a,b){var d=null!=a&&0==a,c=this.state.getVisibleTerminalState(d),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,d):null,d=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0,0,d.width,d.height),d.src),d.preserveImageAspect=
-!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&--d;return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,d){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var z=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),d=b.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(b.isEdge(d)&&null!=c&&c.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 z.apply(this,arguments)};var C=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),d=b.getParent(a.cell),
+!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&--d;return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,d){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var A=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),d=b.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(b.isEdge(d)&&null!=c&&c.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 A.apply(this,arguments)};var C=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),d=b.getParent(a.cell),
c=this.graph.getCellGeometry(a.cell);return b.isEdge(d)&&null!=c&&c.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 E=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var d=this.graph.getModel(),c=d.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!d.isEdge(c)||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 F=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){F.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
@@ -2570,13 +2608,13 @@ function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind
"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+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 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 W=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var O=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),
+a.height+6+this.state.view.graph.tolerance)+"px"}};var X=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){X.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var N=mxEdgeHandler.prototype.destroy;mxEdgeHandler.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)}}();
(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxCylinder.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 t(){mxActor.call(this)}function u(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,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function y(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function E(){mxShape.call(this)}function F(){mxEllipse.call(this)}function D(){mxShape.call(this)}
-function K(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function M(){mxCylinder.call(this)}function Q(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function O(){mxArrowConnector.call(this);this.spacing=0}function G(){mxArrowConnector.call(this);this.spacing=0}function X(){mxActor.call(this)}function N(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}
-function Y(){mxActor.call(this)}function R(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function V(){mxActor.call(this)}function ea(){mxActor.call(this)}function ba(){mxActor.call(this)}function T(){mxActor.call(this)}function aa(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}function Z(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function z(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function C(){mxShape.call(this)}function E(){mxShape.call(this)}function F(){mxEllipse.call(this)}function D(){mxShape.call(this)}
+function K(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function M(){mxCylinder.call(this)}function Q(){mxDoubleEllipse.call(this)}function X(){mxDoubleEllipse.call(this)}function N(){mxArrowConnector.call(this);this.spacing=0}function G(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}
+function Y(){mxActor.call(this)}function S(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function V(){mxActor.call(this)}function da(){mxActor.call(this)}function Z(){mxActor.call(this)}function T(){mxActor.call(this)}function ba(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}function aa(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}
function ja(){mxEllipse.call(this)}function la(){mxActor.call(this)}function ia(){mxActor.call(this)}function pa(){mxActor.call(this)}function ya(a,b,d,c,e,f,g,k,l,m){g+=l;var n=c.clone();c.x-=e*(2*g+l);c.y-=f*(2*g+l);e*=g+l;f*=g+l;return function(){a.ellipse(n.x-e-g,n.y-f-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,d,c,e,f){b=Math.max(0,Math.min(c,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(c,b)):(a.moveTo(0,0),a.lineTo(c-b,0),a.lineTo(c,b),a.lineTo(c,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var va=Math.tan(mxUtils.toRadians(30)),na=(.5-va)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,d,c,e){b=Math.min(c,e/va);a.translate((c-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(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,b,d,c,e,f){b=Math.min(c,e/(.5+va));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((c-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()};
@@ -2600,13 +2638,13 @@ mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEven
a.close(),a.end(),a.fillAndStroke()}};var Fa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,d,c,e){null==a.handJiggle&&Fa.apply(this,arguments)};mxUtils.extend(v,mxRectangleShape);v.prototype.size=.1;v.prototype.isHtmlAllowed=function(){return!1};v.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,d=a.height;a=new mxRectangle(a.x,a.y,b,d);var c=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,c=Math.max(c,Math.min(b*e,d*e));a.x+=c;a.width-=2*c}return a};v.prototype.paintForeground=function(a,b,d,c,e){var f=c*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(c*g,e*g));a.begin();a.moveTo(b+f,d);a.lineTo(b+f,d+e);a.moveTo(b+c-f,d);a.lineTo(b+c-f,d+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=v;mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.redrawPath=function(a,b,d,c,e){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-b,0),new mxPoint(c,e/2),new mxPoint(c-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,d,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.redrawPath=function(a,b,d,c,e){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,.5*e),new mxPoint(c-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,d,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=y;mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(a,b,d,c,e){var f=Math.min(c/5,e/5)+1;a.begin();a.moveTo(b+c/2,d+f);a.lineTo(b+c/2,d+e-f);a.moveTo(b+f,d+e/2);a.lineTo(b+c-f,d+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.prototype.defaultShapes.plus=A;var za=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,d,c,e){za.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-b,0),new mxPoint(c,e/2),new mxPoint(c-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,d,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.redrawPath=function(a,b,d,c,e){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,.5*e),new mxPoint(c-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,d,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=z;mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.paintForeground=function(a,b,d,c,e){var f=Math.min(c/5,e/5)+1;a.begin();a.moveTo(b+c/2,d+f);a.lineTo(b+c/2,d+e-f);a.moveTo(b+f,d+e/2);a.lineTo(b+c-f,d+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.prototype.defaultShapes.plus=y;var za=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,d,c,e){za.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;d+=f;c-=2*f;e-=2*f;0<c&&0<e&&(a.setShadow(!1),za.apply(this,[a,b,d,c,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,d,
c,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;d+=f;c-=2*f;e-=2*f;0<c&&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 k=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+f+"Height"],
p=this.style["symbol"+f+"Spacing"]||0,q=this.style["symbol"+f+"ArcSpacing"];null!=q&&(p+=this.getArcSize(c+this.strokewidth,e+this.strokewidth)*q);var q=b,v=d,q=k==mxConstants.ALIGN_CENTER?q+(c-m)/2:k==mxConstants.ALIGN_RIGHT?q+(c-m-p):q+p,v=l==mxConstants.ALIGN_MIDDLE?v+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?v+(e-n-p):v+p;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,q,v,m,n);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.prototype.defaultShapes.ext=B;mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,b,d,c,e,f){f?(a.moveTo(0,0),a.lineTo(c/2,e/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=z;mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,b,d,c,e){a.translate(b,d);a.ellipse(c/4,0,c/2,e/4);a.fillAndStroke();a.begin();a.moveTo(c/2,e/4);a.lineTo(c/2,2*e/3);a.moveTo(c/2,e/3);a.lineTo(0,
+mxCellRenderer.prototype.defaultShapes.ext=B;mxUtils.extend(A,mxCylinder);A.prototype.redrawPath=function(a,b,d,c,e,f){f?(a.moveTo(0,0),a.lineTo(c/2,e/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=A;mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,b,d,c,e){a.translate(b,d);a.ellipse(c/4,0,c/2,e/4);a.fillAndStroke();a.begin();a.moveTo(c/2,e/4);a.lineTo(c/2,2*e/3);a.moveTo(c/2,e/3);a.lineTo(0,
e/3);a.moveTo(c/2,e/3);a.lineTo(c,e/3);a.moveTo(c/2,2*e/3);a.lineTo(0,e);a.moveTo(c/2,2*e/3);a.lineTo(c,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=C;mxUtils.extend(E,mxShape);E.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};E.prototype.paintBackground=function(a,b,d,c,e){a.translate(b,d);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(c/6,e/2);a.end();a.stroke();a.ellipse(c/
6,0,5*c/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=E;mxUtils.extend(F,mxEllipse);F.prototype.paintVertexShape=function(a,b,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+c/8,d+e);a.lineTo(b+7*c/8,d+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=F;mxUtils.extend(D,mxShape);D.prototype.paintVertexShape=function(a,b,d,c,e){a.translate(b,d);a.begin();a.moveTo(c,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(c,e);
a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=D;mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};K.prototype.paintBackground=function(a,b,d,c,e){a.translate(b,d);a.begin();a.moveTo(3*c/8,e/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,e/8,c,7*e/8);a.fillAndStroke()};K.prototype.paintForeground=function(a,b,d,c,e){a.begin();a.moveTo(3*c/8,e/8*1.1);a.lineTo(5*c/8,e/4);a.end();a.stroke()};
@@ -2619,22 +2657,22 @@ mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,d.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(a,b,d,c,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,d);a.ellipse((c-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(c/2,f);a.lineTo(c/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=I;mxUtils.extend(L,
mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(a,b,d,c,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,d);a.begin();a.moveTo(c/2,f+g);a.lineTo(c/2,e);a.end();a.stroke();a.begin();a.moveTo((c-f)/2-g,f/2);a.quadTo((c-f)/2-g,f+g,c/2,f+g);a.quadTo((c+f)/2+g,f+g,(c+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=L;mxUtils.extend(M,
mxCylinder);M.prototype.jettyWidth=32;M.prototype.jettyHeight=12;M.prototype.redrawPath=function(a,b,d,c,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));d=g/2;var g=d+g/2,k=.3*e-b/2,l=.7*e-b/2;f?(a.moveTo(d,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(d,k+b),a.moveTo(d,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(d,l+b)):(a.moveTo(d,0),a.lineTo(c,0),a.lineTo(c,e),a.lineTo(d,e),a.lineTo(d,l+b),a.lineTo(0,
-l+b),a.lineTo(0,l),a.lineTo(d,l),a.lineTo(d,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(d,k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=M;mxUtils.extend(Q,mxDoubleEllipse);Q.prototype.outerStroke=!0;Q.prototype.paintVertexShape=function(a,b,d,c,e){var f=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(a.ellipse(b+f,d+f,c-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,d,c,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=Q;mxUtils.extend(W,
-Q);W.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=W;mxUtils.extend(O,mxArrowConnector);O.prototype.defaultWidth=4;O.prototype.isOpenEnded=function(){return!0};O.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};O.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=O;mxUtils.extend(G,mxArrowConnector);G.prototype.defaultWidth=10;G.prototype.defaultArrowWidth=
-20;G.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};G.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};G.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=G;mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.redrawPath=
-function(a,b,d,c,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,d,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=X;mxUtils.extend(N,mxRectangleShape);N.prototype.dx=20;N.prototype.dy=20;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.paintForeground=function(a,
+l+b),a.lineTo(0,l),a.lineTo(d,l),a.lineTo(d,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(d,k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=M;mxUtils.extend(Q,mxDoubleEllipse);Q.prototype.outerStroke=!0;Q.prototype.paintVertexShape=function(a,b,d,c,e){var f=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(a.ellipse(b+f,d+f,c-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,d,c,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=Q;mxUtils.extend(X,
+Q);X.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=X;mxUtils.extend(N,mxArrowConnector);N.prototype.defaultWidth=4;N.prototype.isOpenEnded=function(){return!0};N.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};N.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=N;mxUtils.extend(G,mxArrowConnector);G.prototype.defaultWidth=10;G.prototype.defaultArrowWidth=
+20;G.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};G.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};G.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=G;mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.redrawPath=
+function(a,b,d,c,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,d,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=W;mxUtils.extend(O,mxRectangleShape);O.prototype.dx=20;O.prototype.dy=20;O.prototype.isHtmlAllowed=function(){return!1};O.prototype.paintForeground=function(a,
b,d,c,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(c*g,e*g));g=Math.max(f,Math.min(c,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,d+f);a.lineTo(b+c,d+f);a.end();a.stroke();a.begin();a.moveTo(b+g,d);a.lineTo(b+g,
-d+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=N;mxUtils.extend(da,mxActor);da.prototype.dx=20;da.prototype.dy=20;da.prototype.redrawPath=function(a,b,d,c,e){b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=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(c,0),new mxPoint(c,d),new mxPoint(b,d),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=da;mxUtils.extend(Y,mxActor);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.redrawPath=function(a,b,d,c,e){b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=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(c,0),new mxPoint(c,d),new mxPoint((c+b)/2,d),new mxPoint((c+b)/2,e),new mxPoint((c-b)/2,e),new mxPoint((c-b)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=Y;mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,b,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowWidth",this.arrowWidth))));b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c-b,d),new mxPoint(c-b,0),new mxPoint(c,e/2),new mxPoint(c-b,e),new mxPoint(c-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=R;mxUtils.extend(P,mxActor);P.prototype.redrawPath=
-function(a,b,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));d=(e-f)/2;var f=d+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,d),new mxPoint(c-b,d),new mxPoint(c-b,0),new mxPoint(c,e/2),new mxPoint(c-b,e),new mxPoint(c-b,f),
-new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=P;mxUtils.extend(S,mxActor);S.prototype.size=.1;S.prototype.redrawPath=function(a,b,d,c,e){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(c,0);a.quadTo(c-2*b,e/2,c,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=S;mxUtils.extend(V,mxActor);V.prototype.redrawPath=
-function(a,b,d,c,e){a.moveTo(0,0);a.quadTo(c,0,c,e/2);a.quadTo(c,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=V;mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(a,b,d,c,e){a.moveTo(0,0);a.quadTo(c,0,c,e/2);a.quadTo(c,e,0,e);a.quadTo(c/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=ea;mxUtils.extend(ba,mxActor);ba.prototype.size=20;ba.prototype.redrawPath=function(a,b,d,c,e){b=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,.8*b),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,d,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=ba;mxUtils.extend(T,mxActor);T.prototype.size=.375;T.prototype.redrawPath=function(a,b,d,c,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-b),new mxPoint(c/2,e),new mxPoint(0,e-b)],this.isRounded,d,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=T;mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(a,b,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+c/2,d+e);a.lineTo(b+c,d+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=
-aa;mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(a,b,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,d+e/2);a.lineTo(b+c,d+e/2);a.end();a.stroke();a.begin();a.moveTo(b+c/2,d);a.lineTo(b+c/2,d+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ca;mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(a,b,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();
-a.moveTo(b+.145*c,d+.145*e);a.lineTo(b+.855*c,d+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*c,d+.145*e);a.lineTo(b+.145*c,d+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=U;mxUtils.extend(Z,mxRhombus);Z.prototype.paintVertexShape=function(a,b,d,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,d+e/2);a.lineTo(b+c,d+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=Z;mxUtils.extend(ha,
+d+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=O;mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,b,d,c,e){b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=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(c,0),new mxPoint(c,d),new mxPoint(b,d),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=ca;mxUtils.extend(Y,mxActor);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.redrawPath=function(a,b,d,c,e){b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=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(c,0),new mxPoint(c,d),new mxPoint((c+b)/2,d),new mxPoint((c+b)/2,e),new mxPoint((c-b)/2,e),new mxPoint((c-b)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=Y;mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,b,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",this.arrowWidth))));b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c-b,d),new mxPoint(c-b,0),new mxPoint(c,e/2),new mxPoint(c-b,e),new mxPoint(c-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=S;mxUtils.extend(P,mxActor);P.prototype.redrawPath=
+function(a,b,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));d=(e-f)/2;var f=d+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,d),new mxPoint(c-b,d),new mxPoint(c-b,0),new mxPoint(c,e/2),new mxPoint(c-b,e),new mxPoint(c-b,f),
+new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=P;mxUtils.extend(R,mxActor);R.prototype.size=.1;R.prototype.redrawPath=function(a,b,d,c,e){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(c,0);a.quadTo(c-2*b,e/2,c,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=R;mxUtils.extend(V,mxActor);V.prototype.redrawPath=
+function(a,b,d,c,e){a.moveTo(0,0);a.quadTo(c,0,c,e/2);a.quadTo(c,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=V;mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(a,b,d,c,e){a.moveTo(0,0);a.quadTo(c,0,c,e/2);a.quadTo(c,e,0,e);a.quadTo(c/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=da;mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,b,d,c,e){b=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,.8*b),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,d,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=Z;mxUtils.extend(T,mxActor);T.prototype.size=.375;T.prototype.redrawPath=function(a,b,d,c,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-b),new mxPoint(c/2,e),new mxPoint(0,e-b)],this.isRounded,d,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=T;mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(a,b,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+c/2,d+e);a.lineTo(b+c,d+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=
+ba;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,d+e/2);a.lineTo(b+c,d+e/2);a.end();a.stroke();a.begin();a.moveTo(b+c/2,d);a.lineTo(b+c/2,d+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ea;mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(a,b,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();
+a.moveTo(b+.145*c,d+.145*e);a.lineTo(b+.855*c,d+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*c,d+.145*e);a.lineTo(b+.145*c,d+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=U;mxUtils.extend(aa,mxRhombus);aa.prototype.paintVertexShape=function(a,b,d,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,d+e/2);a.lineTo(b+c,d+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=aa;mxUtils.extend(ha,
mxEllipse);ha.prototype.paintVertexShape=function(a,b,d,c,e){a.begin();a.moveTo(b,d);a.lineTo(b+c,d);a.lineTo(b+c/2,d+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,d+e);a.lineTo(b+c,d+e);a.lineTo(b+c/2,d+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ha;mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,b,d,c,e){var f=d+e-5;a.begin();a.moveTo(b,d);a.lineTo(b,d+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+c,f);a.moveTo(b+c,d);a.lineTo(b+c,d+e);a.moveTo(b+c,f);a.lineTo(b+c-10,f-5);a.moveTo(b+c,f);a.lineTo(b+c-10,f+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=fa;mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,b,d,c,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,d,c,e),a.fill(),"1"==mxUtils.getValue(this.style,"top","1")&&(a.begin(),
a.moveTo(b,d),a.lineTo(b+c,d),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"right","1")&&(a.begin(),a.moveTo(b+c,d),a.lineTo(b+c,d+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"bottom","1")&&(a.begin(),a.moveTo(b+c,d+e),a.lineTo(b,d+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"left","1")&&(a.begin(),a.moveTo(b,d+e),a.lineTo(b,d),a.end(),a.stroke()))};mxCellRenderer.prototype.defaultShapes.partialRectangle=ka;mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=
@@ -2645,7 +2683,7 @@ n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,d,c,e,f,g,k,l,m){var
a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*q+e*l,n.y-2*v+f*l);a.moveTo(n.x-q-v+f*l,n.y-v+q-e*l);a.lineTo(n.x+v-q-f*l,n.y-v-q+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,d,c,e,f,g,k,l,m){b=e*l*1.118;d=f*l*1.118;e*=g+l;f*=g+l;var n=c.clone();n.x-=b;n.y-=d;c.x+=1*-e-b;c.y+=1*-f-d;return function(){a.begin();a.moveTo(n.x,n.y);k?a.lineTo(n.x-e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=
null!=a?a:2;return function(b,d,c,e,f,g,k,l,m,n){f*=k+m;g*=k+m;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);l?b.lineTo(p.x-f-g/a,p.y-g+f/a):b.lineTo(p.x+g/a-f,p.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Aa=function(a,b,d){return qa(a,["width"],b,function(b,c,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+d;return new mxPoint(f.x+c*b/4+e*g/2,f.y+e*b/4-c*g/2)},function(b,c,e,f,g,k){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*
b)/a.view.scale-d})},qa=function(a,b,d,c,e){var f=a.absolutePoints,g=f.length-1,k=a.view.translate,l=a.view.scale,m=d?f[0]:f[g],n=d?f[1]:f[g-1],p=n.x-m.x,q=n.y-m.y,v=Math.sqrt(p*p+q*q);return ga(a,b,function(a){a=c.call(this,v,p/v,q/v,m,n);return new mxPoint(a.x/l-k.x,a.y/l-k.y)},function(a,b,d){a=Math.sqrt(p*p+q*q);b.x=(b.x+k.x)*l;b.y=(b.y+k.y)*l;e.call(this,a,p/a,q/a,m,n,b,d)})},oa=function(a){return function(b){return[ga(b,["arrowWidth","arrowSize"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",R.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(b.x+(1-c)*b.width,b.y+(1-d)*b.height/2)},function(b,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-d.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-d.x)/b.width))})]}},wa=function(a,b,d){return function(c){var e=[ga(c,["size"],function(d){var c=Math.max(0,Math.min(d.width,Math.min(d.height,
+"arrowWidth",S.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(b.x+(1-c)*b.width,b.y+(1-d)*b.height/2)},function(b,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-d.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-d.x)/b.width))})]}},wa=function(a,b,d){return function(c){var e=[ga(c,["size"],function(d){var c=Math.max(0,Math.min(d.width,Math.min(d.height,
parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(d.x+c,d.y+c)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,d.x-b.x),Math.min(b.height,d.y-b.y)))/a)})];d&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ma(c));return e}},sa=function(a,b,d){d=null!=d?d:1;return function(c){var e=[ga(c,["size"],function(b){var d=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+d*b.width,b.getCenterY())},
function(a,b){this.state.style.size=Math.max(0,Math.min(d,(b.x-a.x)/a.width))})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ma(c));return e}},Ba=function(a){return function(b){var d=[ga(b,["size"],function(b){var d=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+d*b.width*.75,b.y+b.height/4)},function(b,d){this.state.style.size=Math.max(0,Math.min(a,(d.x-b.x)/(.75*b.width)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
!1)&&d.push(ma(b));return d}},ra=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ma(a));return b}},ma=function(a,b){return ga(a,[mxConstants.STYLE_ARCSIZE],function(d){var c=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(d.x+d.width-Math.min(Math.max(d.width/2,d.height/2),Math.min(d.width,d.height)*c),d.y+(null!=b?b:d.height/8))},function(a,b,d){this.state.style[mxConstants.STYLE_ARCSIZE]=
@@ -2664,23 +2702,23 @@ parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFA
[ga(a,["width","height"],function(a){var b=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),d=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+b,a.y+d)},function(a,b){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,b.y-a.y)))},
!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ma(a));return b},process:function(a){var b=[ga(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.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(ma(a));return b},cross:function(a){return[ga(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",ia.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var d=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)/d*2,Math.max(0,a.getCenterX()-b.x)/d*2)))})]},note:function(a){return[ga(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-b.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},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=[ga(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",X.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(ma(a));return b},dataStorage:function(a){return[ga(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.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))})]},internalStorage:function(a){var b=[ga(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",N.prototype.dx))),
-d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",N.prototype.dy)));return new mxPoint(a.x+b,a.y+d)},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(ma(a));return b},corner:function(a){return[ga(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),
-d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));return new mxPoint(a.x+b,a.y+d)},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[ga(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Y.prototype.dx))),d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));
+b.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},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=[ga(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.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(ma(a));return b},dataStorage:function(a){return[ga(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.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))})]},internalStorage:function(a){var b=[ga(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),
+d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(a.x+b,a.y+d)},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(ma(a));return b},corner:function(a){return[ga(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),
+d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+b,a.y+d)},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[ga(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Y.prototype.dx))),d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));
return new mxPoint(a.x+(a.width+b)/2,a.y+d)},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:oa(1),doubleArrow:oa(.5),folder:function(a){return[ga(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),d=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+d)},function(a,b){var d=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);this.state.style.tabWidth=Math.round(d);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[ga(a,["size"],
function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.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[ga(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.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[ga(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.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:sa(x.prototype.size,!0),hexagon:sa(y.prototype.size,!0,.5),curlyBracket:sa(q.prototype.size,!1),display:sa(pa.prototype.size,!1),cube:wa(1,
-a.prototype.size,!1),card:wa(.5,k.prototype.size,!0),loopLimit:wa(.5,ba.prototype.size,!0),trapezoid:Ba(.5),parallelogram:Ba(1)};Graph.createHandle=ga;Graph.handleFactory=xa;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=xa[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=xa[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),oa=mxUtils.toRadians(-30),ta=mxUtils.getRotatedPoint(ta,
-Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),ua=mxUtils.getRotatedPoint(ua,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,b,d,c,e){var f=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(a,c));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));var l=ta.x,m=ta.y,n=ua.x,p=ua.y,q="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=g&&null!=k){a=function(a,b,d){a-=v.x;var c=b-v.y;b=(p*a-n*c)/(l*p-m*n);a=(m*a-l*c)/(m*n-l*p);q?(d&&(v=new mxPoint(v.x+l*b,v.y+m*b),e.push(v)),v=new mxPoint(v.x+n*a,v.y+p*a)):(d&&(v=new mxPoint(v.x+n*a,v.y+p*a),e.push(v)),v=new mxPoint(v.x+l*b,v.y+m*b));e.push(v)};var v=k;null==c&&(c=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ga=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var d=new mxElbowEdgeHandler(a);d.snapToTerminals=!1;return d}return Ga.apply(this,arguments)};c.prototype.constraints=[];f.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;
-b.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=
-mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,
+Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[ga(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.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:sa(x.prototype.size,!0),hexagon:sa(z.prototype.size,!0,.5),curlyBracket:sa(q.prototype.size,!1),display:sa(pa.prototype.size,!1),cube:wa(1,
+a.prototype.size,!1),card:wa(.5,k.prototype.size,!0),loopLimit:wa(.5,Z.prototype.size,!0),trapezoid:Ba(.5),parallelogram:Ba(1)};Graph.createHandle=ga;Graph.handleFactory=xa;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=xa[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=xa[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),oa=mxUtils.toRadians(-30),ta=mxUtils.getRotatedPoint(ta,Math.cos(oa),Math.sin(oa)),
+oa=mxUtils.toRadians(-150),ua=mxUtils.getRotatedPoint(ua,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,b,d,c,e){var f=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(a,c));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));var l=ta.x,m=ta.y,n=ua.x,p=ua.y,q="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=
+g&&null!=k){a=function(a,b,d){a-=v.x;var c=b-v.y;b=(p*a-n*c)/(l*p-m*n);a=(m*a-l*c)/(m*n-l*p);q?(d&&(v=new mxPoint(v.x+l*b,v.y+m*b),e.push(v)),v=new mxPoint(v.x+n*a,v.y+p*a)):(d&&(v=new mxPoint(v.x+n*a,v.y+p*a),e.push(v)),v=new mxPoint(v.x+l*b,v.y+m*b));e.push(v)};var v=k;null==c&&(c=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ga=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=
+function(a,b){if(b==mxEdgeStyle.IsometricConnector){var d=new mxElbowEdgeHandler(a);d.snapToTerminals=!1;return d}return Ga.apply(this,arguments)};c.prototype.constraints=[];f.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;y.prototype.constraints=mxRectangleShape.prototype.constraints;b.prototype.constraints=
+mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxEllipse.prototype.constraints;
+ja.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;T.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)];M.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=
@@ -2693,8 +2731,8 @@ e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxC
.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!1),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)];n.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=
mxRectangleShape.prototype.constraints;m.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;Y.prototype.constraints=null;da.prototype.constraints=null;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)];ia.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)];H.prototype.constraints=null;V.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)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0)];mxArrow.prototype.constraints=null;Y.prototype.constraints=null;ca.prototype.constraints=null;S.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)];ia.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)];H.prototype.constraints=null;V.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)];da.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 b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var c=this.editorUi,f=c.editor,d=f.graph,b=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.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 d=mxUtils.parseXml(a),c=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,c);var e=c.getChildren(c.getChildAt(c.getRoot(),0));f.graph.setSelectionCells(f.graph.importCells(e))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@@ -2810,8 +2848,8 @@ m=l.cloneNode(!1);l.style.backgroundColor="#d7d7d7";m.style.backgroundColor="#d7
mxUtils.write(m,mxResources.get("arrange"));f.appendChild(m);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);c(l,d,k++);c(m,f,k++)}}};BaseFormatPanel=function(a,c,f){this.format=a;this.editorUi=c;this.container=f;this.listeners=[]};
BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),f=null,d=0;d<c.length;d++){var b=a.view.getState(c[d]);if(null!=b&&(b=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),null!=b))if(null==f)f=b;else if(f!=b)return null}return f};
BaseFormatPanel.prototype.installInputHandler=function(a,c,f,d,b,e,g,k){e=null!=e?e:"";k=null!=k?k:!1;var l=this.editorUi,m=l.editor.graph;d=null!=d?d:1;b=null!=b?b:999;var n=null,p=!1,q=mxUtils.bind(this,function(q){var t=k?parseFloat(a.value):parseInt(a.value);isNaN(t)||c!=mxConstants.STYLE_ROTATION||(t=mxUtils.mod(Math.round(100*t),36E3)/100);t=Math.min(b,Math.max(d,isNaN(t)?f:t));if(m.cellEditor.isContentEditing()&&g)p||(p=!0,null!=n&&(m.cellEditor.restoreSelection(n),n=null),g(t),a.value=t+e,
-p=!1);else if(t!=mxUtils.getValue(this.format.getSelectionState().style,c,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{if(m.setCellStyles(c,t,m.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var v=m.getSelectionCells(),x=0;x<v.length;x++){var y=v[x];if(m.isHtmlLabel(y)){var A=document.createElement("div");A.innerHTML=m.convertValueToString(y);for(var B=A.getElementsByTagName("font"),z=0;z<B.length;z++)B[z].removeAttribute("size"),B[z].style.fontSize=t+"px";m.cellLabelChanged(y,
-A.innerHTML)}}}finally{m.getModel().endUpdate()}l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[t],"cells",m.getSelectionCells()))}a.value=t+e;mxEvent.consume(q)});g&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){n=m.cellEditor.saveSelection()}),mxEvent.addListener(a,"touchstart",function(){n=m.cellEditor.saveSelection()}));mxEvent.addListener(a,"change",q);mxEvent.addListener(a,"blur",q);return q};
+p=!1);else if(t!=mxUtils.getValue(this.format.getSelectionState().style,c,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{if(m.setCellStyles(c,t,m.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var v=m.getSelectionCells(),x=0;x<v.length;x++){var z=v[x];if(m.isHtmlLabel(z)){var y=document.createElement("div");y.innerHTML=m.convertValueToString(z);for(var B=y.getElementsByTagName("font"),A=0;A<B.length;A++)B[A].removeAttribute("size"),B[A].style.fontSize=t+"px";m.cellLabelChanged(z,
+y.innerHTML)}}}finally{m.getModel().endUpdate()}l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[t],"cells",m.getSelectionCells()))}a.value=t+e;mxEvent.consume(q)});g&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){n=m.cellEditor.saveSelection()}),mxEvent.addListener(a,"touchstart",function(){n=m.cellEditor.saveSelection()}));mxEvent.addListener(a,"change",q);mxEvent.addListener(a,"blur",q);return q};
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,f,d,b,e){f=null!=f?f:1;d=null!=d?d:8;if(mxClient.IS_QUIRKS)d-=2;else if(mxClient.IS_MT||8<=document.documentMode)d+=1;var g=document.createElement("div");mxUtils.setPrefixedStyle(g.style,"borderRadius","3px");g.style.border="1px solid rgb(192, 192, 192)";g.style.position="absolute";var k=document.createElement("div");k.style.borderBottom="1px solid rgb(192, 192, 192)";k.style.position="relative";k.style.height=d+"px";k.style.width="10px";k.className=
"geBtnUp";g.appendChild(k);var l=k.cloneNode(!1);l.style.border="none";l.style.height=d+"px";l.className="geBtnDown";g.appendChild(l);mxEvent.addListener(l,"click",function(b){""==a.value&&(a.value=e||"2");var d=parseInt(a.value);isNaN(d)||(a.value=d-f,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(k,"click",function(b){""==a.value&&(a.value=e||"0");var d=parseInt(a.value);isNaN(d)||(a.value=d+f,null!=c&&c(b));mxEvent.consume(b)});if(b){var m=null;mxEvent.addGestureListeners(g,function(a){if(mxClient.IS_QUIRKS||
@@ -2856,10 +2894,10 @@ ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,f=c.editor.graph
a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(a)?"":a+"°"}),g=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,l);f.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){f.getModel().removeListener(l)}});l()}return a};
ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,f=c.editor.graph,d=this.format.getSelectionState(),b=this.createPanel();b.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));b.appendChild(e);var g,k,l,m,n=this.addUnitInput(b,"pt",84,44,function(){g.apply(this,arguments)}),p=this.addUnitInput(b,"pt",20,44,function(){k.apply(this,arguments)}),
q=document.createElement("div");q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");q.style.position="relative";q.style.cursor="pointer";q.style.marginTop="-3px";q.style.border="0px";q.style.left="52px";mxUtils.setOpacity(q,50);mxEvent.addListener(q,"mouseenter",function(){mxUtils.setOpacity(q,100)});mxEvent.addListener(q,"mouseleave",function(){mxUtils.setOpacity(q,50)});mxEvent.addListener(q,"click",function(){c.actions.get("autosize").funct()});
-b.appendChild(q);this.addLabel(b,mxResources.get("width"),84);this.addLabel(b,mxResources.get("height"),20);mxUtils.br(b);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var t=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");t.style.width="100%";e.appendChild(t);b.appendChild(e);this.addKeyHandler(n,y);this.addKeyHandler(p,y);g=this.addGeometryHandler(n,
+b.appendChild(q);this.addLabel(b,mxResources.get("width"),84);this.addLabel(b,mxResources.get("height"),20);mxUtils.br(b);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var t=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");t.style.width="100%";e.appendChild(t);b.appendChild(e);this.addKeyHandler(n,z);this.addKeyHandler(p,z);g=this.addGeometryHandler(n,
function(a,b){0<a.width&&(a.width=Math.max(1,b))});k=this.addGeometryHandler(p,function(a,b){0<a.height&&(a.height=Math.max(1,b))});a.appendChild(b);var u=this.createPanel();u.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("position"));u.appendChild(e);var v=this.addUnitInput(u,"pt",84,44,function(){l.apply(this,arguments)}),x=this.addUnitInput(u,"pt",20,44,
-function(){m.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),84);this.addLabel(u,mxResources.get("top"),20);var y=mxUtils.bind(this,function(a,c,e){d=this.format.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)b.style.display="none";else{b.style.display="";if(e||document.activeElement!=n)n.value=d.width+(""==d.width?"":" pt");if(e||document.activeElement!=p)p.value=d.height+(""==d.height?"":" pt")}if(d.vertices.length==
-f.getSelectionCount()&&null!=d.x&&null!=d.y){u.style.display="";if(e||document.activeElement!=v)v.value=d.x+(""==d.x?"":" pt");if(e||document.activeElement!=x)x.value=d.y+(""==d.y?"":" pt")}else u.style.display="none"});this.addKeyHandler(v,y);this.addKeyHandler(x,y);f.getModel().addListener(mxEvent.CHANGE,y);this.listeners.push({destroy:function(){f.getModel().removeListener(y)}});y();l=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.x=b:a.x=b});m=this.addGeometryHandler(x,function(a,
+function(){m.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),84);this.addLabel(u,mxResources.get("top"),20);var z=mxUtils.bind(this,function(a,c,e){d=this.format.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)b.style.display="none";else{b.style.display="";if(e||document.activeElement!=n)n.value=d.width+(""==d.width?"":" pt");if(e||document.activeElement!=p)p.value=d.height+(""==d.height?"":" pt")}if(d.vertices.length==
+f.getSelectionCount()&&null!=d.x&&null!=d.y){u.style.display="";if(e||document.activeElement!=v)v.value=d.x+(""==d.x?"":" pt");if(e||document.activeElement!=x)x.value=d.y+(""==d.y?"":" pt")}else u.style.display="none"});this.addKeyHandler(v,z);this.addKeyHandler(x,z);f.getModel().addListener(mxEvent.CHANGE,z);this.listeners.push({destroy:function(){f.getModel().removeListener(z)}});z();l=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.x=b:a.x=b});m=this.addGeometryHandler(x,function(a,
b){a.relative?a.offset.y=b:a.y=b});a.appendChild(u)};
ArrangePanel.prototype.addGeometryHandler=function(a,c){function f(e){if(""!=a.value){var f=parseFloat(a.value);if(f!=b){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),l=0;l<k.length;l++)if(d.getModel().isVertex(k[l])){var m=d.getCellGeometry(k[l]);null!=m&&(m=m.clone(),c(m,f),d.getModel().setGeometry(k[l],m))}}finally{d.getModel().endUpdate()}b=f;a.value=f+" pt"}else isNaN(f)&&(a.value=b+" pt")}mxEvent.consume(e)}var d=this.editorUi.editor.graph,b=null;mxEvent.addListener(a,"blur",
f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){b=a.value});return f};
@@ -2873,23 +2911,23 @@ k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px
"0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");k=e.cloneNode(!1);k.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+
" ("+this.editorUi.actions.get("underline").shortcut+")");var n=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([n]);var p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_LEFT]),p),t=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),p),u=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
-[mxConstants.ALIGN_RIGHT]),p);this.styleButtons([q,t,u]);if(d.cellEditor.isContentEditing()){var v=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([v])}var x=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),y=this.editorUi.toolbar.addButton("geSprite-middle",
-mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),A=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([x,y,A]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var B,z,C,E,F,D,K;d.cellEditor.isContentEditing()?(x.style.display="none",y.style.display="none",
-A.style.display="none",n.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,B=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),z=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
+[mxConstants.ALIGN_RIGHT]),p);this.styleButtons([q,t,u]);if(d.cellEditor.isContentEditing()){var v=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([v])}var x=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),z=this.editorUi.toolbar.addButton("geSprite-middle",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),y=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([x,z,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var B,A,C,E,F,D,K;d.cellEditor.isContentEditing()?(x.style.display="none",z.style.display="none",
+y.style.display="none",n.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,B=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),A=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
C.style.marginRight="9px",v=p.cloneNode(!1),v.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
!1,null)},v),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},v)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),v.style.height="40"),a.appendChild(v)):(m[2].style.marginRight="9px",u.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px";
p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var H=document.createElement("select");H.style.position="absolute";H.style.right="20px";H.style.width="97px";H.style.marginTop="-2px";for(var J="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),I={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]},v=0;v<J.length;v++){var L=document.createElement("option");L.setAttribute("value",J[v]);mxUtils.write(L,mxResources.get(J[v]));H.appendChild(L)}p.appendChild(H);J=e.cloneNode(!1);J.style.marginLeft="0px";J.style.paddingTop=
-"4px";J.style.paddingBottom="4px";J.style.fontWeight="normal";mxUtils.write(J,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 L=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},v=0;v<L.length;v++){var W=document.createElement("option");W.setAttribute("value",L[v]);mxUtils.write(W,
-mxResources.get(L[v]));M.appendChild(W)}J.appendChild(M);d.isEditing()||(a.appendChild(p),mxEvent.addListener(H,"change",function(a){d.getModel().beginUpdate();try{var b=I[H.value];null!=b&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,b[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,b[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,b[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,b[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(a)}),
-a.appendChild(J),mxEvent.addListener(M,"change",function(a){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[M.value],d.getSelectionCells());mxEvent.consume(a)}));var O=document.createElement("input");O.style.textAlign="right";O.style.marginTop="4px";mxClient.IS_QUIRKS||(O.style.position="absolute",O.style.right="32px");O.style.width="46px";O.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(O);var G=null,p=this.installInputHandler(O,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
-1,999," pt",function(a){G=a;document.execCommand("fontSize",!1,"4");a=d.cellEditor.textarea.getElementsByTagName("font");for(var b=0;b<a.length;b++)if("4"==a[b].getAttribute("size")){a[b].removeAttribute("size");a[b].style.fontSize=G+"px";window.setTimeout(function(){O.value=G+" pt";G=null},0);break}},!0),p=this.createStepper(O,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=O.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
-k.style.cssFloat="right";var X=null,N="#ffffff",da=null,Y="#000000",R=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return N},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){X=a},destroy:function(){X=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");R.style.fontWeight="bold";var P=this.createCellColorOption(mxResources.get("borderColor"),
-mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");P.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Y},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){da=a},destroy:function(){da=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){R.style.display=null==a||a==mxConstants.NONE?"none":"";
-P.style.display=R.style.display},function(a){null==a||a==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(R);d.cellEditor.isContentEditing()||g.appendChild(P);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,
+"4px";J.style.paddingBottom="4px";J.style.fontWeight="normal";mxUtils.write(J,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 L=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},v=0;v<L.length;v++){var X=document.createElement("option");X.setAttribute("value",L[v]);mxUtils.write(X,
+mxResources.get(L[v]));M.appendChild(X)}J.appendChild(M);d.isEditing()||(a.appendChild(p),mxEvent.addListener(H,"change",function(a){d.getModel().beginUpdate();try{var b=I[H.value];null!=b&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,b[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,b[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,b[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,b[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(a)}),
+a.appendChild(J),mxEvent.addListener(M,"change",function(a){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[M.value],d.getSelectionCells());mxEvent.consume(a)}));var N=document.createElement("input");N.style.textAlign="right";N.style.marginTop="4px";mxClient.IS_QUIRKS||(N.style.position="absolute",N.style.right="32px");N.style.width="46px";N.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(N);var G=null,p=this.installInputHandler(N,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+1,999," pt",function(a){G=a;document.execCommand("fontSize",!1,"4");a=d.cellEditor.textarea.getElementsByTagName("font");for(var b=0;b<a.length;b++)if("4"==a[b].getAttribute("size")){a[b].removeAttribute("size");a[b].style.fontSize=G+"px";window.setTimeout(function(){N.value=G+" pt";G=null},0);break}},!0),p=this.createStepper(N,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=N.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
+k.style.cssFloat="right";var W=null,O="#ffffff",ca=null,Y="#000000",S=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return O},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){W=a},destroy:function(){W=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");S.style.fontWeight="bold";var P=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");P.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Y},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){ca=a},destroy:function(){ca=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){S.style.display=null==a||a==mxConstants.NONE?"none":"";
+P.style.display=S.style.display},function(a){null==a||a==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(S);d.cellEditor.isContentEditing()||g.appendChild(P);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,
"wrap","null",null,null,!0);k.style.fontWeight="bold";b.containsLabel||b.autoSize||0!=b.edges.length||g.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,f.actions.get("formattedText"));k.style.fontWeight="bold";g.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";p=document.createElement("div");p.style.position="absolute";p.style.width="70px";p.style.marginTop="0px";p.style.fontWeight=
-"bold";mxUtils.write(p,mxResources.get("spacing"));k.appendChild(p);var S,V,ea,ba,T,aa=this.addUnitInput(k,"pt",91,44,function(){S.apply(this,arguments)}),ca=this.addUnitInput(k,"pt",20,44,function(){V.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var U=this.addUnitInput(k,"pt",162,44,function(){ea.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",91,44,function(){ba.apply(this,arguments)}),
+"bold";mxUtils.write(p,mxResources.get("spacing"));k.appendChild(p);var R,V,da,Z,T,ba=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),ea=this.addUnitInput(k,"pt",20,44,function(){V.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var U=this.addUnitInput(k,"pt",162,44,function(){da.apply(this,arguments)}),aa=this.addUnitInput(k,"pt",91,44,function(){Z.apply(this,arguments)}),
ha=this.addUnitInput(k,"pt",20,44,function(){T.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(d.cellEditor.isContentEditing()){var fa=null,ka=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var b=""==a.value?120:parseInt(a.value),b=Math.max(0,isNaN(b)?120:b);null!=fa&&(d.cellEditor.restoreSelection(fa),fa=null);for(var c=
d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;null!=c&&c==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("P"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="<p>"+d.cellEditor.textarea.innerHTML+"</p>"),c=d.cellEditor.textarea.firstChild);null!=c&&c!=d.cellEditor.textarea&&(c.style.lineHeight=b+"%");a.value=b+" %"},function(a){ka=a;mxEvent.addListener(a,"mousedown",function(){fa=d.cellEditor.saveSelection()});
mxEvent.addListener(a,"touchstart",function(){fa=d.cellEditor.saveSelection()});a.value="120 %"}));g=e.cloneNode(!1);g.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],g,!0);p=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},g),this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];
@@ -2901,16 +2939,16 @@ g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.create
function(a,b,d,c){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){F.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=F){var a=F.getAttribute("cellPadding")||0,a=new FilenameDialog(f,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?F.setAttribute("cellPadding",
a):F.removeAttribute("cellPadding")}),mxResources.get("spacing"));f.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=F&&F.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=F&&F.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=F&&F.setAttribute("align","right")},
e)];this.styleButtons(p);p[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(g),mxUtils.br(g));g.appendChild(e);a.appendChild(g);E=g}else a.appendChild(g),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var ja=mxUtils.bind(this,function(a,d,e){b=this.format.getSelectionState();a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=O)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),O.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(q,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(x,a==mxConstants.ALIGN_TOP);c(y,a==mxConstants.ALIGN_MIDDLE);c(A,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);H.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
+mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=N)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),N.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
+c(q,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(x,a==mxConstants.ALIGN_TOP);c(z,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);H.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
"topLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(b.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(e||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING,2)),ca.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=aa)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_TOP,0)),aa.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(b.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),ha.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Z.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=U)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),U.value=isNaN(a)?"":a+" pt"});V=this.installInputHandler(ca,mxConstants.STYLE_SPACING,2,-999,999," pt");S=this.installInputHandler(aa,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");T=this.installInputHandler(ha,
-mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ba=this.installInputHandler(Z,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ea=this.installInputHandler(U,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(O,ja);this.addKeyHandler(ca,ja);this.addKeyHandler(aa,ja);this.addKeyHandler(ha,ja);this.addKeyHandler(Z,ja);this.addKeyHandler(U,ja);d.getModel().addListener(mxEvent.CHANGE,ja);this.listeners.push({destroy:function(){d.getModel().removeListener(ja)}});ja();if(d.cellEditor.isContentEditing()){var la=
+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(e||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING,2)),ea.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_TOP,0)),ba.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(b.style,
+mxConstants.STYLE_SPACING_RIGHT,0)),ha.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=aa)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),aa.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=U)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),U.value=isNaN(a)?"":a+" pt"});V=this.installInputHandler(ea,mxConstants.STYLE_SPACING,2,-999,999," pt");R=this.installInputHandler(ba,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");T=this.installInputHandler(ha,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");Z=this.installInputHandler(aa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");da=this.installInputHandler(U,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(N,ja);this.addKeyHandler(ea,ja);this.addKeyHandler(ba,ja);this.addKeyHandler(ha,ja);this.addKeyHandler(aa,ja);this.addKeyHandler(U,ja);d.getModel().addListener(mxEvent.CHANGE,ja);this.listeners.push({destroy:function(){d.getModel().removeListener(ja)}});ja();if(d.cellEditor.isContentEditing()){var la=
!1,e=function(){la||(la=!0,window.setTimeout(function(){for(var a=d.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var b=mxUtils.getCurrentStyle(a);if(null!=b){c(m[0],"bold"==b.fontWeight||null!=d.getParentByName(a,"B",d.cellEditor.textarea));c(m[1],"italic"==b.fontStyle||null!=d.getParentByName(a,"I",d.cellEditor.textarea));c(m[2],null!=d.getParentByName(a,"U",d.cellEditor.textarea));c(q,"left"==b.textAlign);c(t,"center"==b.textAlign);c(u,"right"==
-b.textAlign);c(C,"justify"==b.textAlign);c(z,null!=d.getParentByName(a,"SUP",d.cellEditor.textarea));c(B,null!=d.getParentByName(a,"SUB",d.cellEditor.textarea));F=d.getParentByName(a,"TABLE",d.cellEditor.textarea);K=null==F?null:d.getParentByName(a,"TR",F);D=null==F?null:d.getParentByName(a,"TD",F);E.style.display=null!=F?"":"none";if(document.activeElement!=O){"FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=G?(a.removeAttribute("size"),a.style.fontSize=G+"px",G=null):O.value=parseFloat(b.fontSize)+
+b.textAlign);c(C,"justify"==b.textAlign);c(A,null!=d.getParentByName(a,"SUP",d.cellEditor.textarea));c(B,null!=d.getParentByName(a,"SUB",d.cellEditor.textarea));F=d.getParentByName(a,"TABLE",d.cellEditor.textarea);K=null==F?null:d.getParentByName(a,"TR",F);D=null==F?null:d.getParentByName(a,"TD",F);E.style.display=null!=F?"":"none";if(document.activeElement!=N){"FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=G?(a.removeAttribute("size"),a.style.fontSize=G+"px",G=null):N.value=parseFloat(b.fontSize)+
" pt";var a=a.style.lineHeight||b.lineHeight,e=parseFloat(a);"px"==a.substring(a.length-2)&&(e/=parseFloat(b.fontSize));"%"!=a.substring(a.length-1)&&(e*=100);ka.value=e+" %"}a=b.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,d,c){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});e=b.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,d,c){return"#"+
-("0"+Number(b).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});null!=da&&(Y="#"==a.charAt(0)?a:"#000000",da(Y,!0));null!=X&&(N="#"==e.charAt(0)?e:null,X(N,!0));null!=l.firstChild&&(b=b.fontFamily,"'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),l.firstChild.nodeValue=b)}}la=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});null!=ca&&(Y="#"==a.charAt(0)?a:"#000000",ca(Y,!0));null!=W&&(O="#"==e.charAt(0)?e:null,W(O,!0));null!=l.firstChild&&(b=b.fontFamily,"'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),l.firstChild.nodeValue=b)}}la=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);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()));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))};
@@ -2920,8 +2958,8 @@ StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,
null==a||a==mxConstants.NONE?"none":""}),e="image"==f.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,g=this.createCellColorOption(mxResources.get("fill"),e,"#ffffff");g.style.fontWeight="bold";e=mxUtils.getValue(f.style,e,null);b.style.display=null!=e&&e!=mxConstants.NONE&&f.fill&&"image"!=f.style.shape?"":"none";for(var e=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],k=0;k<e.length;k++){var l=document.createElement("option");
l.setAttribute("value",e[k]);mxUtils.write(l,mxResources.get(e[k]));d.appendChild(l)}b.appendChild(d);var m=mxUtils.bind(this,function(){f=this.format.getSelectionState();var c=mxUtils.getValue(f.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);d.value=c;a.style.display=f.fill?"":"none";c=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,null);b.style.display=!f.fill||f.containsImage||null==c||c==mxConstants.NONE?"none":""});c.getModel().addListener(mxEvent.CHANGE,
m);this.listeners.push({destroy:function(){c.getModel().removeListener(m)}});m();mxEvent.addListener(d,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(g);a.appendChild(b);"swimlane"==f.style.shape&&a.appendChild(this.createCellColorOption(mxResources.get("laneColor"),"swimlaneFillColor","#ffffff"));return a};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(x.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));x.value=c+" pt";mxEvent.consume(a)}function f(a){var c=parseInt(y.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
-c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));y.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var g=document.createElement("div");g.style.fontWeight=
+StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(x.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));x.value=c+" pt";mxEvent.consume(a)}function f(a){var c=parseInt(z.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
+c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));z.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var g=document.createElement("div");g.style.fontWeight=
"bold";var k=document.createElement("select");k.style.position="absolute";k.style.marginTop="-2px";k.style.right="72px";k.style.width="80px";for(var l=["sharp","rounded","curved"],m=0;m<l.length;m++){var n=document.createElement("option");n.setAttribute("value",l[m]);mxUtils.write(n,mxResources.get(l[m]));k.appendChild(n)}mxEvent.addListener(k,"change",function(a){b.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],e=["0",null];"rounded"==k.value?e=["1",null]:
"curved"==k.value&&(e=[null,"1"]);for(var f=0;f<c.length;f++)b.setCellStyles(c[f],e[f],b.getSelectionCells());d.fireEvent(new mxEventObject("styleChanged","keys",c,"values",e,"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(k,"click",function(a){mxEvent.consume(a)});var p="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,l=this.createCellColorOption(mxResources.get("line"),p,"#000000");l.appendChild(k);g.appendChild(l);
var q=g.cloneNode(!1);q.style.fontWeight="normal";q.style.whiteSpace="nowrap";q.style.position="relative";q.style.paddingLeft="16px";q.style.marginBottom="2px";q.style.marginTop="2px";q.className="geToolbarContainer";var t=mxUtils.bind(this,function(a,b,d,c,e){a=this.editorUi.menus.styleChange(a,"",c,e,"geIcon",null);c=document.createElement("div");c.style.width=b+"px";c.style.height="1px";c.style.borderBottom="1px "+d+" black";c.style.paddingTop="6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";
@@ -2931,8 +2969,8 @@ mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.men
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"))})),
n=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){t(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));t(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
mxResources.get("dotted")+" (1)");t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),l=q.cloneNode(!1),x=document.createElement("input");x.style.textAlign="right";x.style.marginTop="2px";x.style.width="41px";x.setAttribute("title",mxResources.get("linewidth"));q.appendChild(x);
-var y=x.cloneNode(!0);u.appendChild(y);var A=this.createStepper(x,c,1,9);A.style.display=x.style.display;A.style.marginTop="2px";q.appendChild(A);var B=this.createStepper(y,f,1,9);B.style.display=y.style.display;B.style.marginTop="2px";u.appendChild(B);mxClient.IS_QUIRKS?(x.style.height="17px",y.style.height="17px"):(x.style.position="absolute",x.style.right="32px",x.style.height="15px",A.style.right="20px",y.style.position="absolute",y.style.right="32px",y.style.height="15px",B.style.right="20px");
-mxEvent.addListener(x,"blur",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(y,"blur",f);mxEvent.addListener(y,"change",f);mxClient.IS_QUIRKS&&(mxUtils.br(l),mxUtils.br(l));var z=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
+var z=x.cloneNode(!0);u.appendChild(z);var y=this.createStepper(x,c,1,9);y.style.display=x.style.display;y.style.marginTop="2px";q.appendChild(y);var B=this.createStepper(z,f,1,9);B.style.display=z.style.display;B.style.marginTop="2px";u.appendChild(B);mxClient.IS_QUIRKS?(x.style.height="17px",z.style.height="17px"):(x.style.position="absolute",x.style.right="32px",x.style.height="15px",y.style.right="20px",z.style.position="absolute",z.style.right="32px",z.style.height="15px",B.style.right="20px");
+mxEvent.addListener(x,"blur",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"blur",f);mxEvent.addListener(z,"change",f);mxClient.IS_QUIRKS&&(mxUtils.br(l),mxUtils.br(l));var A=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.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"==e.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
@@ -2959,20 +2997,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(v,8);this.addArrow(z);this.addArrow(C);this.addArrow(E);A=this.addArrow(m,9);A.className="geIcon";A.style.width="84px";B=this.addArrow(n,9);B.className="geIcon";B.style.width="22px";var F=document.createElement("div");F.style.width="85px";F.style.height="1px";F.style.borderBottom="1px solid black";F.style.marginBottom="9px";A.appendChild(F);var D=document.createElement("div");D.style.width="23px";D.style.height="1px";D.style.borderBottom=
-"1px solid black";D.style.marginBottom="9px";B.appendChild(D);m.style.height="15px";n.style.height="15px";v.style.height="15px";z.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";a.appendChild(g);a.appendChild(u);a.appendChild(q);m=q.cloneNode(!1);m.style.paddingBottom="6px";m.style.paddingTop="4px";m.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";
-n.style.marginTop="2px";n.style.fontWeight="normal";n.style.width="76px";mxUtils.write(n,mxResources.get("lineend"));m.appendChild(n);var K,H,J=this.addUnitInput(m,"pt",74,33,function(){K.apply(this,arguments)}),I=this.addUnitInput(m,"pt",20,33,function(){H.apply(this,arguments)});mxUtils.br(m);A=document.createElement("div");A.style.height="8px";m.appendChild(A);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,M,Q=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,
-arguments)}),W=this.addUnitInput(m,"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),74,50);this.addLabel(m,mxResources.get("size"),20,50);mxUtils.br(m);g=g.cloneNode(!1);g.style.fontWeight="normal";g.style.position="relative";g.style.paddingLeft="16px";g.style.marginBottom="2px";g.style.marginTop="6px";g.style.borderWidth="0px";g.style.paddingBottom="18px";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom=
-"12px";n.style.marginTop="1px";n.style.fontWeight="normal";n.style.width="120px";mxUtils.write(n,mxResources.get("perimeter"));g.appendChild(n);var O,G=this.addUnitInput(g,"pt",20,41,function(){O.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(m)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var X=mxUtils.bind(this,function(a,c,f){function g(a,b,c,f){c=
+null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(v,8);this.addArrow(A);this.addArrow(C);this.addArrow(E);y=this.addArrow(m,9);y.className="geIcon";y.style.width="84px";B=this.addArrow(n,9);B.className="geIcon";B.style.width="22px";var F=document.createElement("div");F.style.width="85px";F.style.height="1px";F.style.borderBottom="1px solid black";F.style.marginBottom="9px";y.appendChild(F);var D=document.createElement("div");D.style.width="23px";D.style.height="1px";D.style.borderBottom=
+"1px solid black";D.style.marginBottom="9px";B.appendChild(D);m.style.height="15px";n.style.height="15px";v.style.height="15px";A.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";a.appendChild(g);a.appendChild(u);a.appendChild(q);m=q.cloneNode(!1);m.style.paddingBottom="6px";m.style.paddingTop="4px";m.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";
+n.style.marginTop="2px";n.style.fontWeight="normal";n.style.width="76px";mxUtils.write(n,mxResources.get("lineend"));m.appendChild(n);var K,H,J=this.addUnitInput(m,"pt",74,33,function(){K.apply(this,arguments)}),I=this.addUnitInput(m,"pt",20,33,function(){H.apply(this,arguments)});mxUtils.br(m);y=document.createElement("div");y.style.height="8px";m.appendChild(y);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,M,Q=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,
+arguments)}),X=this.addUnitInput(m,"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),74,50);this.addLabel(m,mxResources.get("size"),20,50);mxUtils.br(m);g=g.cloneNode(!1);g.style.fontWeight="normal";g.style.position="relative";g.style.paddingLeft="16px";g.style.marginBottom="2px";g.style.marginTop="6px";g.style.borderWidth="0px";g.style.paddingBottom="18px";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom=
+"12px";n.style.marginTop="1px";n.style.fontWeight="normal";n.style.width="120px";mxUtils.write(n,mxResources.get("perimeter"));g.appendChild(n);var N,G=this.addUnitInput(g,"pt",20,41,function(){N.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(m)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var W=mxUtils.bind(this,function(a,c,f){function g(a,b,c,f){c=
c.getElementsByTagName("div")[0];c.className=d.getCssClassForMarker(f,e.style.shape,a,b);"geSprite geSprite-noarrow"==c.className&&(c.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),c.style.backgroundImage="none",c.style.verticalAlign="top",c.style.marginTop="5px",c.style.fontSize="10px",c.nextSibling.style.marginTop="0px");return c}e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(f||document.activeElement!=x)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,
-1)),x.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=y)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),y.value=isNaN(a)?"":a+" pt";k.style.visibility="connector"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?k.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,
-null)?F.style.borderBottom="1px dashed black":F.style.borderBottom="1px dotted black":F.style.borderBottom="1px solid black";D.style.borderBottom=F.style.borderBottom;a=z.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==
+1)),x.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=z)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),z.value=isNaN(a)?"":a+" pt";k.style.visibility="connector"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?k.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,
+null)?F.style.borderBottom="1px dashed black":F.style.borderBottom="1px dotted black":F.style.borderBottom="1px solid black";D.style.borderBottom=F.style.borderBottom;a=A.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.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(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";v.getElementsByTagName("div")[0].className="link"==e.style.shape?
"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==b.getSelectionCount()?(u.style.display="",q.style.display="none"):(u.style.display="none",q.style.display="");a=g(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill",
-"1"),E,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(z,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(E,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(E,100));if(f||document.activeElement!=W)a=parseInt(mxUtils.getValue(e.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),W.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),
-J.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt"});M=this.installInputHandler(W,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");H=this.installInputHandler(I,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0,-999,999," pt");O=this.installInputHandler(G,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(x,X);this.addKeyHandler(W,X);this.addKeyHandler(Q,X);this.addKeyHandler(I,X);this.addKeyHandler(J,X);this.addKeyHandler(G,X);b.getModel().addListener(mxEvent.CHANGE,X);this.listeners.push({destroy:function(){b.getModel().removeListener(X)}});X();return a};
+"1"),E,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(A,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(E,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(E,100));if(f||document.activeElement!=X)a=parseInt(mxUtils.getValue(e.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),X.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),
+J.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt"});M=this.installInputHandler(X,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");H=this.installInputHandler(I,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0,-999,999," pt");N=this.installInputHandler(G,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(x,W);this.addKeyHandler(X,W);this.addKeyHandler(Q,W);this.addKeyHandler(I,W);this.addKeyHandler(J,W);this.addKeyHandler(G,W);b.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){b.getModel().removeListener(W)}});W();return a};
StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var d=document.createElement("table");mxClient.IS_QUIRKS&&(d.style.fontSize="1em");d.style.width="100%";d.style.fontWeight="bold";d.style.paddingRight="20px";var b=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var g=document.createElement("td");g.style.padding="0px";g.style.width="50%";g.setAttribute("valign",
"top");var k=g.cloneNode(!0);k.style.paddingLeft="8px";e.appendChild(g);e.appendChild(k);b.appendChild(e);d.appendChild(b);a.appendChild(d);var l=g,m=0,n=mxUtils.bind(this,function(a,b,d){a=this.createCellOption(a,b,d);a.style.width="100%";l.appendChild(a);l=l==g?k:g;m++}),p=mxUtils.bind(this,function(b,d,c){f=this.format.getSelectionState();g.innerHTML="";k.innerHTML="";l=g;f.rounded&&n(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==f.style.shape&&n(mxResources.get("divider"),
"swimlaneLine",1);f.containsImage||n(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);f.glass&&n(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);f.comic&&n(mxResources.get("comic"),"comic",0);0==m&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){c.getModel().removeListener(p)}});p();return a};
@@ -3037,18 +3075,6 @@ Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,
Toolbar.prototype.createLabel=function(a,c){var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");f.className="geLabel";mxUtils.write(f,a);return f};
Toolbar.prototype.addMenuHandler=function(a,c,f,d){if(null!=f){var b=this.editorUi.editor.graph,e=null,g=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(k){if(g&&(null==a.enabled||a.enabled)){b.popupMenuHandler.hideMenu();e=new mxPopupMenu(f);e.div.className+=" geToolbarMenu";e.showDisabled=d;e.labels=c;e.autoExpand=!0;var l=mxUtils.getOffset(a);e.popup(l.x,l.y+a.offsetHeight,null,k);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}g=!0;mxEvent.consume(k)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){g=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};
-function Dialog(a,c,f,d,b,e,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);f+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(1,Math.round((document.body.scrollWidth-f-64)/2)),n=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
-l.style.width=f+"px";l.style.height=d+"px";l.style.left=m+"px";l.style.top=n+"px";l.style.zIndex=this.zIndex;null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.left="0px",this.bg.style.top="0px",this.bg.style.bottom="0px",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));b&&document.body.appendChild(this.bg);l.appendChild(c);
-document.body.appendChild(l);e&&(c=document.createElement("img"),c.setAttribute("src",Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("close")),c.className="geDialogClose",c.style.top=n+14+"px",c.style.left=m+f+38-k+"px",c.style.zIndex=this.zIndex,mxEvent.addListener(c,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(c),this.dialogImg=c,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.onDialogClose=
-g;this.container=l;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+
-"/clear.gif";
-Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
-"/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);this.container.parentNode.removeChild(this.container)};
var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=
function(a,c,f,d){function b(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,d,c,e){d=null!=d?d:12;var f=document.createElement("table");f.style.borderCollapse="collapse";f.setAttribute("cellspacing","0");f.style.marginBottom="20px";f.style.cellSpacing="0px";var l=document.createElement("tbody");f.appendChild(l);for(var n=a.length/d,p=0;p<n;p++){for(var q=document.createElement("tr"),v=0;v<d;v++)(function(a){var b=
document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;q.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(k.fromString("ffffff"),g.value="none"):k.fromString(a)}))})(a[p*d+v]);l.appendChild(q)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
@@ -3060,44 +3086,19 @@ ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");c.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(f);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);f=document.createElement("a");f.setAttribute("href",
-"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";c.appendChild(f);this.container=c},PageSetupDialog=function(a){function c(){null==n||n==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=n,m.style.backgroundImage="")}function f(){null==
-t?(q.removeAttribute("title"),q.style.fontSize="",q.innerHTML=mxResources.get("change")+"..."):(q.setAttribute("title",t.src),q.style.fontSize="11px",q.innerHTML=t.src.substring(0,42)+"...")}var d=a.editor.graph,b,e,g=document.createElement("table");g.style.width="100%";g.style.height="100%";var k=document.createElement("tbody");b=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");b.appendChild(e);
-e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var l=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",d.pageFormat);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("background")+":");b.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="18px";
-m.style.height="18px";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var n=d.background;c();mxEvent.addListener(m,"click",function(b){a.pickColor(n||"none",function(a){n=a;c()});mxEvent.consume(b)});e.appendChild(m);mxUtils.write(e,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();e.appendChild(p);
-mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?d.getGridSize():a)});b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+":");b.appendChild(e);e=document.createElement("td");var q=document.createElement("a");q.style.textDecoration="underline";q.style.cursor="pointer";q.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(q,"click",function(b){a.showBackgroundImageDialog(function(a){t=
-a;f()});mxEvent.consume(b)});f();e.appendChild(q);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&e.appendChild(u);var v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=n&&a.setBackgroundColor(n);d.backgroundImage!==
-t&&a.setBackgroundImage(t);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(u);b.appendChild(e);k.appendChild(b);g.appendChild(k);this.container=g};
-PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function b(a,b,d){if(d||p!=document.activeElement&&q!=document.activeElement){a=!1;for(b=0;b<u.length;b++)d=u[b],A?"custom"==d.key&&(k.value=d.key,A=!1):null!=d.format&&(f.width==d.format.width&&f.height==d.format.height?(k.value=d.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,a=!0):f.width==d.format.height&&f.height==d.format.width&&(k.value=d.key,e.removeAttribute("checked"),
-e.defaultChecked=!1,e.checked=!1,g.setAttribute("checked","checked"),g.defaultChecked=!0,a=g.checked=!0));a?(l.style.display="",n.style.display="none"):(p.value=f.width,q.value=f.height,y.setAttribute("selected","selected"),e.setAttribute("checked","checked"),e.defaultChecked=!0,l.style.display="none",n.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var g=document.createElement("input");
-g.setAttribute("name",c);g.setAttribute("type","radio");g.setAttribute("value","landscape");var k=document.createElement("select");k.style.marginBottom="8px";k.style.width="202px";var l=document.createElement("div");l.style.marginLeft="4px";l.style.width="210px";l.style.height="24px";e.style.marginRight="6px";l.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));l.appendChild(c);g.style.marginLeft="10px";g.style.marginRight="6px";l.appendChild(g);
-var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));l.appendChild(m);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var p=document.createElement("input");p.setAttribute("size","6");p.setAttribute("value",f.width);n.appendChild(p);mxUtils.write(n," x ");var q=document.createElement("input");q.setAttribute("size","6");q.setAttribute("value",f.height);n.appendChild(q);mxUtils.write(n," pt");
-l.style.display="none";n.style.display="none";for(var t={},u=PageSetupDialog.getFormats(),v=0;v<u.length;v++){var x=u[v];t[x.key]=x;var y=document.createElement("option");y.setAttribute("value",x.key);mxUtils.write(y,x.title);k.appendChild(y)}var A=!1;b();a.appendChild(k);mxUtils.br(a);a.appendChild(l);a.appendChild(n);var B=f,z=function(){var a=t[k.value];null!=a.format?(p.value=a.format.width,q.value=a.format.height,n.style.display="none",l.style.display=""):(l.style.display="none",n.style.display=
-"");a=new mxRectangle(0,0,parseInt(p.value),parseInt(q.value));"custom"!=k.value&&g.checked&&(a=new mxRectangle(0,0,a.height,a.width));if(a.width!=B.width||a.height!=B.height)B=a,null!=d&&d(B)};mxEvent.addListener(c,"click",function(a){e.checked=!0;z();mxEvent.consume(a)});mxEvent.addListener(m,"click",function(a){g.checked=!0;z();mxEvent.consume(a)});mxEvent.addListener(p,"blur",z);mxEvent.addListener(p,"click",z);mxEvent.addListener(q,"blur",z);mxEvent.addListener(q,"click",z);mxEvent.addListener(g,
-"change",z);mxEvent.addListener(e,"change",z);mxEvent.addListener(k,"change",function(){A="custom"==k.value;z()});z();return{set:function(a){f=a;b(null,null,!0)},get:function(){return B},widthInput:p,heightInput:q}};
-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:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1652)},{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,584,826)},{key:"custom",title:mxResources.get("custom"),format:null}]};var PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var b=k.checked||m.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,e=1/f.pageScale;if(b){var g=k.checked?1:parseInt(n.value);isNaN(g)||(e=mxUtils.getScaleForPageCount(g,f,c))}f.getGraphBounds();var l=g=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);e*=d;!b&&f.pageVisible?(d=f.getPageLayout(),g-=d.x*c.width,l-=d.y*c.height):
-b=!0;b=PrintDialog.createPrintPreview(f,e,c,0,g,l,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,b,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");b=document.createElement("td");b.setAttribute("colspan","2");b.style.fontSize="10pt";b.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("fitPage"));
-b.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(a)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(b);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");b=document.createElement("td");b.style.fontSize="10pt";b.appendChild(m);l=document.createElement("span");mxUtils.write(l," "+mxResources.get("posterPrint")+":");b.appendChild(l);mxEvent.addListener(l,
-"click",function(a){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(a)});d.appendChild(b);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";b=document.createElement("td");b.style.fontSize="10pt";b.appendChild(n);mxUtils.write(b," "+mxResources.get("pages")+" (max)");d.appendChild(b);g.appendChild(d);mxEvent.addListener(m,"change",
-function(){m.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);b=document.createElement("td");mxUtils.write(b,mxResources.get("pageScale")+":");d.appendChild(b);b=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";b.appendChild(p);d.appendChild(b);g.appendChild(d);d=document.createElement("tr");b=document.createElement("td");b.colSpan=2;
-b.style.paddingTop="20px";b.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&b.appendChild(l);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});q.className="geBtn";b.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||
-b.appendChild(l);d.appendChild(b);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}};
-PrintDialog.createPrintPreview=function(a,c,f,d,b,e,g){c=new mxPrintPreview(a,c,f,d,b,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=g;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var k=c.writeHead;c.writeHead=function(a){k.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 c};
-PrintDialog.previewEnabled=!0;
-var FilenameDialog=function(a,c,f,d,b,e,g,k,l,m){l=null!=l?l:!0;var n,p,q=document.createElement("table"),t=document.createElement("tbody");q.style.marginTop="8px";n=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace="nowrap";p.style.fontSize="10pt";p.style.width="120px";mxUtils.write(p,(b||mxResources.get("filename"))+":");n.appendChild(p);var u=document.createElement("input");u.setAttribute("value",c||"");u.style.marginLeft="4px";u.style.width="180px";var v=mxUtils.button(f,
-function(){if(null==e||e(u.value))l&&a.hideDialog(),d(u.value)});v.className="geBtn gePrimaryBtn";this.init=function(){if(null!=b||null==g)if(u.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=q.parentNode,d=null;mxEvent.addListener(a,"dragleave",function(a){null!=d&&(d.style.backgroundColor="",d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==
-d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=u,d.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(u.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),v.click());a.stopPropagation();a.preventDefault()}))}};p=document.createElement("td");p.appendChild(u);n.appendChild(p);null==b&&null!=g||t.appendChild(n);
-null!=g&&(n=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(g),n.appendChild(p),t.appendChild(n));n=document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";p.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});c.className="geBtn";a.editor.cancelFirst&&p.appendChild(c);null!=k&&(f=mxUtils.button(mxResources.get("help"),function(){window.open(k)}),
-f.className="geBtn",p.appendChild(f));mxEvent.addListener(u,"keypress",function(a){13==a.keyCode&&v.click()});p.appendChild(v);a.editor.cancelFirst||p.appendChild(c);n.appendChild(p);t.appendChild(n);q.appendChild(t);this.container=q},TextareaDialog=function(a,c,f,d,b,e,g,k,l,m,n,p){g=null!=g?g:300;k=null!=k?k:120;m=null!=m?m:!1;var q,t,u=document.createElement("table"),v=document.createElement("tbody");q=document.createElement("tr");t=document.createElement("td");t.style.fontSize="10pt";t.style.width=
-"100px";mxUtils.write(t,c);q.appendChild(t);v.appendChild(q);q=document.createElement("tr");t=document.createElement("td");var x=document.createElement("textarea");n&&x.setAttribute("wrap","off");mxUtils.write(x,f||"");x.style.resize="none";x.style.width=g+"px";x.style.height=k+"px";this.textarea=x;this.init=function(){x.focus();x.scrollTop=0};t.appendChild(x);q.appendChild(t);v.appendChild(q);q=document.createElement("tr");t=document.createElement("td");t.style.paddingTop="14px";t.style.whiteSpace=
-"nowrap";t.setAttribute("align","right");c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});c.className="geBtn";a.editor.cancelFirst&&t.appendChild(c);null!=l&&l(t);null!=d&&(l=mxUtils.button(p||mxResources.get("apply"),function(){m||a.hideDialog();d(x.value)}),l.className="geBtn gePrimaryBtn",t.appendChild(l));a.editor.cancelFirst||t.appendChild(c);q.appendChild(t);v.appendChild(q);u.appendChild(v);this.container=u},EditDiagramDialog=function(a){var c=document.createElement("div");
-c.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="370px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",
-function(a){a.stopPropagation();a.preventDefault()},!1),f.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var d=new FileReader;d.onload=function(a){f.value=a.target.result};d.readAsText(b)}else f.value=a.extractGraphModelFromEvent(b)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);var b=document.createElement("select");b.style.width=
-"180px";b.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));b.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&b.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),
-b.appendChild(e));c.appendChild(b);e=mxUtils.button(mxResources.get("ok"),function(){var d=a.editor.graph.zapGremlins(mxUtils.trim(f.value)),c=null;if("new"==b.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(d,null),window.open(a.getUrl());else if("replace"==b.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(d).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==
-b.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(d),m=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,m);var n=m.getChildren(m.getChildAt(m.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(n));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(d);this.container=c};
-EditDiagramDialog.showNewWindowOption=!0;
+"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";c.appendChild(f);this.container=c},FilenameDialog=function(a,c,f,d,b,e,g,k,l,m){l=null!=l?l:!0;var n,p,q=document.createElement("table"),t=document.createElement("tbody");q.style.marginTop="8px";n=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace=
+"nowrap";p.style.fontSize="10pt";p.style.width="120px";mxUtils.write(p,(b||mxResources.get("filename"))+":");n.appendChild(p);var u=document.createElement("input");u.setAttribute("value",c||"");u.style.marginLeft="4px";u.style.width="180px";var v=mxUtils.button(f,function(){if(null==e||e(u.value))l&&a.hideDialog(),d(u.value)});v.className="geBtn gePrimaryBtn";this.init=function(){if(null!=b||null==g)if(u.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",
+!1,null),Graph.fileSupport){var a=q.parentNode,d=null;mxEvent.addListener(a,"dragleave",function(a){null!=d&&(d.style.backgroundColor="",d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=u,d.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/uri-list")&&(u.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),v.click());a.stopPropagation();a.preventDefault()}))}};p=document.createElement("td");p.appendChild(u);n.appendChild(p);null==b&&null!=g||t.appendChild(n);null!=g&&(n=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(g),n.appendChild(p),t.appendChild(n));n=document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";
+p.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});c.className="geBtn";a.editor.cancelFirst&&p.appendChild(c);null!=k&&(f=mxUtils.button(mxResources.get("help"),function(){window.open(k)}),f.className="geBtn",p.appendChild(f));mxEvent.addListener(u,"keypress",function(a){13==a.keyCode&&v.click()});p.appendChild(v);a.editor.cancelFirst||p.appendChild(c);n.appendChild(p);t.appendChild(n);q.appendChild(t);this.container=q},TextareaDialog=
+function(a,c,f,d,b,e,g,k,l,m,n,p){g=null!=g?g:300;k=null!=k?k:120;m=null!=m?m:!1;var q,t,u=document.createElement("table"),v=document.createElement("tbody");q=document.createElement("tr");t=document.createElement("td");t.style.fontSize="10pt";t.style.width="100px";mxUtils.write(t,c);q.appendChild(t);v.appendChild(q);q=document.createElement("tr");t=document.createElement("td");var x=document.createElement("textarea");n&&x.setAttribute("wrap","off");mxUtils.write(x,f||"");x.style.resize="none";x.style.width=
+g+"px";x.style.height=k+"px";this.textarea=x;this.init=function(){x.focus();x.scrollTop=0};t.appendChild(x);q.appendChild(t);v.appendChild(q);q=document.createElement("tr");t=document.createElement("td");t.style.paddingTop="14px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});c.className="geBtn";a.editor.cancelFirst&&t.appendChild(c);null!=l&&l(t);null!=d&&(l=mxUtils.button(p||mxResources.get("apply"),
+function(){m||a.hideDialog();d(x.value)}),l.className="geBtn gePrimaryBtn",t.appendChild(l));a.editor.cancelFirst||t.appendChild(c);q.appendChild(t);v.appendChild(q);u.appendChild(v);this.container=u},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize",
+"off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="370px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),f.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var d=new FileReader;d.onload=
+function(a){f.value=a.target.result};d.readAsText(b)}else f.value=a.extractGraphModelFromEvent(b)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);var b=document.createElement("select");b.style.width="180px";b.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));b.appendChild(e)}e=
+document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&b.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),b.appendChild(e));c.appendChild(b);e=mxUtils.button(mxResources.get("ok"),function(){var d=a.editor.graph.zapGremlins(mxUtils.trim(f.value)),c=null;if("new"==b.value)window.openFile=
+new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(d,null),window.open(a.getUrl());else if("replace"==b.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(d).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==b.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(d),m=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,m);var n=m.getChildren(m.getChildAt(m.getRoot(),
+0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(n));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(d);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
var ExportDialog=function(a){function c(){var a=n.value,b=a.lastIndexOf(".");n.value=0<b?a.substring(0,b+1)+p.value:a+"."+p.value;"xml"===p.value?(q.setAttribute("disabled","true"),t.setAttribute("disabled","true"),u.setAttribute("disabled","true"),x.setAttribute("disabled","true")):(q.removeAttribute("disabled"),t.removeAttribute("disabled"),u.removeAttribute("disabled"),x.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}
function f(){t.style.backgroundColor=t.value*u.value>MAX_AREA||0>=t.value?"red":"";u.style.backgroundColor=t.value*u.value>MAX_AREA||0>=u.value?"red":""}var d=a.editor.graph,b=d.getGraphBounds(),e=d.view.scale,g=Math.ceil(b.width/e),k=Math.ceil(b.height/e),l,e=document.createElement("table"),m=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");b=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";l.style.width="100px";mxUtils.write(l,
mxResources.get("filename")+":");b.appendChild(l);var n=document.createElement("input");n.setAttribute("value",a.editor.getOrCreateFilename());n.style.width="180px";l=document.createElement("td");l.appendChild(n);b.appendChild(l);m.appendChild(b);b=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("format")+":");b.appendChild(l);var p=document.createElement("select");p.style.width="180px";l=document.createElement("option");l.setAttribute("value",
@@ -3107,8 +3108,8 @@ q.setAttribute("type","number");q.setAttribute("value","100");q.style.width="180
l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("height")+":");b.appendChild(l);var u=document.createElement("input");u.setAttribute("value",k);u.style.width="180px";l=document.createElement("td");l.appendChild(u);b.appendChild(l);m.appendChild(b);b=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("background")+":");b.appendChild(l);var v=document.createElement("input");v.setAttribute("type",
"checkbox");v.checked=null==d.background||d.background==mxConstants.NONE;l=document.createElement("td");l.appendChild(v);mxUtils.write(l,mxResources.get("transparent"));b.appendChild(l);m.appendChild(b);b=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("borderWidth")+":");b.appendChild(l);var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("value",ExportDialog.lastBorderValue);x.style.width="180px";
l=document.createElement("td");l.appendChild(x);b.appendChild(l);m.appendChild(b);e.appendChild(m);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(q,"change",function(){var a=Math.max(0,parseFloat(q.value)||100)/100;q.value=parseFloat((100*a).toFixed(2));0<g?(t.value=Math.floor(g*a),u.value=Math.floor(k*a)):(q.value="100",t.value=g,u.value=k);f()});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value)/g;0<a?(q.value=parseFloat((100*a).toFixed(2)),u.value=Math.floor(k*a)):(q.value=
-"100",t.value=g,u.value=k);f()});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value)/k;0<a?(q.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(g*a)):(q.value="100",t.value=g,u.value=k);f()});b=document.createElement("tr");l=document.createElement("td");l.setAttribute("align","right");l.style.paddingTop="22px";l.colSpan=2;var y=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(q.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=
-n.value,c=p.value,e=Math.max(0,parseFloat(q.value)||100)/100,f=Math.max(0,parseInt(x.value)),g=d.background;if(("svg"==c||"png"==c)&&v.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,e,f)}}));y.className="geBtn gePrimaryBtn";var A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});A.className="geBtn";a.editor.cancelFirst?(l.appendChild(A),l.appendChild(y)):(l.appendChild(y),l.appendChild(A));b.appendChild(l);
+"100",t.value=g,u.value=k);f()});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value)/k;0<a?(q.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(g*a)):(q.value="100",t.value=g,u.value=k);f()});b=document.createElement("tr");l=document.createElement("td");l.setAttribute("align","right");l.style.paddingTop="22px";l.colSpan=2;var z=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(q.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=
+n.value,c=p.value,e=Math.max(0,parseFloat(q.value)||100)/100,f=Math.max(0,parseInt(x.value)),g=d.background;if(("svg"==c||"png"==c)&&v.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,e,f)}}));z.className="geBtn gePrimaryBtn";var y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});y.className="geBtn";a.editor.cancelFirst?(l.appendChild(y),l.appendChild(z)):(l.appendChild(z),l.appendChild(y));b.appendChild(l);
m.appendChild(b);e.appendChild(m);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,c,f,d,b,e){var g=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(g.getSvg(d,b,e)),c,f);else{var k=g.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((e/b-k.x)/g.view.scale),Math.floor((e/b-k.y)/g.view.scale));l.scale(b/g.view.scale);(new mxImageExport).drawState(g.getView().getState(g.model.root),
l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(k.width*b/g.view.scale+2*e);b=Math.ceil(k.height*b/g.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&l*b<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(c)+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+b+"&"+m)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
@@ -3119,9 +3120,9 @@ a){m[d]=null;k.table.deleteRow(b);break}null!=m[d]&&b++}}}(b);mxEvent.addListene
g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.marginTop="6px";var v=document.createElement("input");v.setAttribute("placeholder",mxResources.get("enterPropertyName"));v.setAttribute("type","text");v.setAttribute("size",mxClient.IS_QUIRKS?"18":"22");v.style.marginLeft="2px";g.appendChild(v);d.appendChild(g);var x=mxUtils.button(mxResources.get("addProperty"),function(){var a=v.value;if(0<a.length&&"label"!=a&&"placeholders"!=a)try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();
else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var d=k.addTextarea(a+":","",2);d.style.width="100%";m.push(d);p(d,a);d.focus()}v.value=""}catch(E){mxUtils.alert(E)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<m.length?m[0].focus():v.focus()};x.setAttribute("disabled","disabled");x.style.marginLeft="10px";x.style.width="144px";g.appendChild(x);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});
g.className="geBtn";q=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var d=!1,f=0;f<l.length;f++)null==m[f]?e.removeAttribute(l[f]):(e.setAttribute(l[f],m[f].value),d=d||"placeholder"==l[f]&&"1"==e.getAttribute("placeholders"));d&&e.removeAttribute("label");b.getModel().setValue(c,e)}catch(C){mxUtils.alert(C)}});q.className="geBtn gePrimaryBtn";mxEvent.addListener(v,"keyup",f);mxEvent.addListener(v,"change",f);t=document.createElement("div");
-t.style.marginTop="18px";t.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){u=document.createElement("span");u.style.marginRight="10px";var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(y.setAttribute("checked","checked"),y.defaultChecked=!0);mxEvent.addListener(y,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders",
-"1")});u.appendChild(y);mxUtils.write(u,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){y=document.createElement("a");y.setAttribute("href",EditDataDialog.placeholderHelpLink);y.setAttribute("title",mxResources.get("help"));y.setAttribute("target","_blank");y.style.marginLeft="10px";y.style.cursor="help";var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("valign","middle");A.style.marginTop="-4px";A.setAttribute("src",Editor.helpImage);y.appendChild(A);
-u.appendChild(y)}t.appendChild(u)}a.editor.cancelFirst?(t.appendChild(g),t.appendChild(q)):(t.appendChild(q),t.appendChild(g));d.appendChild(t);this.container=d};EditDataDialog.placeholderHelpLink=null;
+t.style.marginTop="18px";t.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){u=document.createElement("span");u.style.marginRight="10px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);mxEvent.addListener(z,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders",
+"1")});u.appendChild(z);mxUtils.write(u,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){z=document.createElement("a");z.setAttribute("href",EditDataDialog.placeholderHelpLink);z.setAttribute("title",mxResources.get("help"));z.setAttribute("target","_blank");z.style.marginLeft="10px";z.style.cursor="help";var y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop="-4px";y.setAttribute("src",Editor.helpImage);z.appendChild(y);
+u.appendChild(z)}t.appendChild(u)}a.editor.cancelFirst?(t.appendChild(g),t.appendChild(q)):(t.appendChild(q),t.appendChild(g));d.appendChild(t);this.container=d};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,c,f,d){var b=document.createElement("div");mxUtils.write(b,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var g=document.createElement("input");g.setAttribute("value",c);g.setAttribute("placeholder","http://www.example.com/");g.setAttribute("type",
"text");g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.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(){g.value="";g.focus()});e.appendChild(g);e.appendChild(c);b.appendChild(e);this.init=function(){g.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(g.value))});
@@ -3139,14 +3140,14 @@ m.style.marginLeft="4px";m.style.marginRight="6px";m.style.marginTop="4px";l.app
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&&(l=document.createElement("a"),l.setAttribute("title",mxResources.get("toBack")),l.className="geButton",l.style.cssFloat="none",l.innerHTML="&#9660;",l.style.width="14px",l.style.height="14px",l.style.fontSize="14px",l.style.margin="0px",l.style.marginTop="-1px",b.appendChild(l),mxEvent.addListener(l,"click",function(b){k.isEnabled()&&
k.addCell(d,k.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<t-1&&(l=document.createElement("a"),l.setAttribute("title",mxResources.get("toFront")),l.className="geButton",l.style.cssFloat="none",l.innerHTML="&#9650;",l.style.width="14px",l.style.height="14px",l.style.fontSize="14px",l.style.margin="0px",l.style.marginTop="-1px",b.appendChild(l),mxEvent.addListener(l,"click",function(b){k.isEnabled()&&k.addCell(d,k.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||
10<=document.documentMode)&&(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(d),mxEvent.consume(a))});k.getDefaultParent()==d?(f.style.background="#e6eff8",f.style.fontWeight="bold",u=d):mxEvent.addListener(f,"click",function(a){k.isEnabled()&&(k.setDefaultParent(c),k.view.setCurrentRoot(null),g())});n.appendChild(f)}t=k.model.getChildCount(k.model.root);n.innerHTML="";for(var b=t-1;0<=
-b;b--)mxUtils.bind(this,function(d){a(b,d.value||mxResources.get("background"),d,d)})(k.model.getChildAt(k.model.root,b));x.setAttribute("title",mxResources.get("removeIt",[u.value||mxResources.get("background")]));y.setAttribute("title",mxResources.get("moveSelectionTo",[u.value||mxResources.get("background")]));B.setAttribute("title",mxResources.get("duplicateIt",[u.value||mxResources.get("background")]));A.setAttribute("title",mxResources.get("renameIt",[u.value||mxResources.get("background")]));
-k.isSelectionEmpty()&&(y.className="geButton mxDisabled")}var k=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background="whiteSmoke";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";var m=EditorUi.compactUi?"26px":"30px",n=document.createElement("div");n.style.backgroundColor="#e5e5e5";n.style.position="absolute";n.style.overflow="auto";n.style.left="0px";n.style.right="0px";n.style.top="0px";n.style.bottom=
+b;b--)mxUtils.bind(this,function(d){a(b,d.value||mxResources.get("background"),d,d)})(k.model.getChildAt(k.model.root,b));x.setAttribute("title",mxResources.get("removeIt",[u.value||mxResources.get("background")]));z.setAttribute("title",mxResources.get("moveSelectionTo",[u.value||mxResources.get("background")]));B.setAttribute("title",mxResources.get("duplicateIt",[u.value||mxResources.get("background")]));y.setAttribute("title",mxResources.get("renameIt",[u.value||mxResources.get("background")]));
+k.isSelectionEmpty()&&(z.className="geButton mxDisabled")}var k=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background="whiteSmoke";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";var m=EditorUi.compactUi?"26px":"30px",n=document.createElement("div");n.style.backgroundColor="#e5e5e5";n.style.position="absolute";n.style.overflow="auto";n.style.left="0px";n.style.right="0px";n.style.top="0px";n.style.bottom=
parseInt(m)+7+"px";l.appendChild(n);var p=null,q=null;mxEvent.addListener(l,"dragover",function(a){a.dataTransfer.dropEffect="move";q=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(l,"drop",function(a){a.stopPropagation();a.preventDefault()});var t=null,u=null,v=document.createElement("div");v.className="geToolbarContainer";v.style.position="absolute";v.style.bottom="0px";v.style.left="0px";v.style.right="0px";v.style.height=m;v.style.overflow="hidden";v.style.padding=EditorUi.compactUi?
"4px 0px 3px 0px":"1px";v.style.backgroundColor="whiteSmoke";v.style.borderWidth="1px 0px 0px 0px";v.style.borderColor="#c3c3c3";v.style.borderStyle="solid";v.style.display="block";v.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(v.style.filter="none");m=document.createElement("a");m.className="geButton";mxClient.IS_QUIRKS&&(m.style.filter="none");var x=m.cloneNode();x.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(x,"click",function(a){if(k.isEnabled()){k.model.beginUpdate();
-try{var b=k.model.root.getIndex(u);k.removeCells([u],!1);0==k.model.getChildCount(k.model.root)?(k.model.add(k.model.root,new mxCell),k.setDefaultParent(null)):0<b&&b<=k.model.getChildCount(k.model.root)?k.setDefaultParent(k.model.getChildAt(k.model.root,b-1)):k.setDefaultParent(null)}finally{k.model.endUpdate()}}mxEvent.consume(a)});k.isEnabled()||(x.className="geButton mxDisabled");v.appendChild(x);var y=m.cloneNode();y.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
-mxEvent.addListener(y,"click",function(a){k.isEnabled()&&!k.isSelectionEmpty()&&k.moveCells(k.getSelectionCells(),0,0,!1,u)});v.appendChild(y);var A=m.cloneNode();A.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';A.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(A,"click",function(a){k.isEnabled()&&e(u);mxEvent.consume(a)});k.isEnabled()||(A.className="geButton mxDisabled");v.appendChild(A);var B=m.cloneNode();B.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
+try{var b=k.model.root.getIndex(u);k.removeCells([u],!1);0==k.model.getChildCount(k.model.root)?(k.model.add(k.model.root,new mxCell),k.setDefaultParent(null)):0<b&&b<=k.model.getChildCount(k.model.root)?k.setDefaultParent(k.model.getChildAt(k.model.root,b-1)):k.setDefaultParent(null)}finally{k.model.endUpdate()}}mxEvent.consume(a)});k.isEnabled()||(x.className="geButton mxDisabled");v.appendChild(x);var z=m.cloneNode();z.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
+mxEvent.addListener(z,"click",function(a){k.isEnabled()&&!k.isSelectionEmpty()&&k.moveCells(k.getSelectionCells(),0,0,!1,u)});v.appendChild(z);var y=m.cloneNode();y.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';y.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(y,"click",function(a){k.isEnabled()&&e(u);mxEvent.consume(a)});k.isEnabled()||(y.className="geButton mxDisabled");v.appendChild(y);var B=m.cloneNode();B.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
mxEvent.addListener(B,"click",function(a){if(k.isEnabled()){a=null;k.model.beginUpdate();try{a=k.cloneCells([u])[0],a.value=mxResources.get("untitledLayer"),a.setVisible(!0),a=k.addCell(a,k.model.root),k.setDefaultParent(a)}finally{k.model.endUpdate()}null==a||k.isCellLocked(a)||k.selectAll(a)}});k.isEnabled()||(B.className="geButton mxDisabled");v.appendChild(B);m=m.cloneNode();m.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';m.setAttribute("title",mxResources.get("addLayer"));
-mxEvent.addListener(m,"click",function(a){if(k.isEnabled()){k.model.beginUpdate();try{var b=k.addCell(new mxCell(mxResources.get("untitledLayer")),k.model.root);k.setDefaultParent(b)}finally{k.model.endUpdate()}}mxEvent.consume(a)});k.isEnabled()||(m.className="geButton mxDisabled");v.appendChild(m);l.appendChild(v);g();k.model.addListener(mxEvent.CHANGE,function(){g()});k.selectionModel.addListener(mxEvent.CHANGE,function(){k.isSelectionEmpty()?y.className="geButton mxDisabled":y.className="geButton"});
+mxEvent.addListener(m,"click",function(a){if(k.isEnabled()){k.model.beginUpdate();try{var b=k.addCell(new mxCell(mxResources.get("untitledLayer")),k.model.root);k.setDefaultParent(b)}finally{k.model.endUpdate()}}mxEvent.consume(a)});k.isEnabled()||(m.className="geButton mxDisabled");v.appendChild(m);l.appendChild(v);g();k.model.addListener(mxEvent.CHANGE,function(){g()});k.selectionModel.addListener(mxEvent.CHANGE,function(){k.isSelectionEmpty()?z.className="geButton mxDisabled":z.className="geButton"});
this.window=new mxWindow(mxResources.get("layers"),l,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=g;this.window.setLocation=function(a,b){var d=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,d-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="vV1bV+M6sv41rDP7gax0oHufeYQEaGYamk1o+ryxFFtJNNiWt2yTpn/9UVVJtpP4Il+YtbqJnfj7VNalVJJKpfDXjWLxdsKUkrvkZPpPvNCfR/8uwr1HJ5c8Sk9m0298DR8XBsaiTcB9fZFmKnLleBSb7WCSH3GJIYubaQ455iwIZAY0C5mtAl6iSndS3+3Yu0umFDx/ZcwvsaxlpjrQbPmbklEJH8nU2+LLJGITsUD/JNqzZi6UlwVMlYg8/VUgoo2LGP/KwvhUFGLMpp/0c4rHAbzFinmvkNWRL/Fb/HCnmvWlMjWORf5hqUuVbuVGQvY41p17k62z6RKztSyizitTDA5ZNai4lwGPfK6OW1PyKqIIKCLbLJNAhK5kT1hzf2oZKhh9quf11PW8P4UPDeSJiYD7A6V9UmIv49Kt4tw9545fcTb9KpX4LaMUa8G2fNOL7pmrVHiIfysuG6h+Z4pPLjyPJ4mGz3XiSgIk4V6mRArv9crfq76o48pSGbJUYE1k+kZ/bLhu1dN/BqA5I2rOnoS/64Al2waipZaf508bmuZXgb+QIYF+fZBAK5SQVJJY6+wwgjlxzJluUwdyW4l9lrIVS+Bnf9VOdcfUK0/jgHmACPEOVQlwJlsZOwm0XPwbHpfrdMfwC5+/8UDGIXUqrwI4E0/xna+ELn/XF11mK40SsckcT/cKoLxjHnniuP7UkPzkq0SkHN8qANQmkCvehr7UyjQDtbjk6k1g7tjk9Scq2iSV8Y5p1QctToS8gUykl5kHWQtVGdv9Uus2ZF3RD+2N4VL8fmLBayFSUpKpDTyHRof1DN9Edw66aAQ2Qp9jj+iLONANBPInY4pFKacq5vEIa1PMVSjSSm6UYS+nnJvFAda09bXYZIqaxGx6LbCp+dLLsD4BPTzRkVpfPegyZRtecK7kL5e8oxI7lqMdGMZZitU9lJFIpcJ8TnRzO9bLR1hdAth6FjyANgPa9J5rO0q9lsrdNvuyKqgnXdQoh9rnlYwvdR5V1FrMudhkaAvNlX4VFSuRUH0XgU+CrrJERKDgW/Ddcx4RZB11QN2I9Gu2sm+rM5kBSnqppKuNSBvxXxe3UYJWeL0ergZyFqRbqBNb3Wawim856pgt/uIABl1OdYzy1hIZQ7dNgPcYjZJnGEdwT5r6dsciXbyqg575xuIUOw2vqPttmDtdBagWhQzVOrefEfYivBktV1Q94q2M4DOVmbdtTZNQe7o0yfVXA9UhTxakApQD86B56/49S7egWvMevWSfmH4jZr65auB9X/71DRp/UY2Sv4PmenVAcV+2LLRBl62wStPQqr1UDuBPMhbeCdgt+/ZLJeEB1XdduTSPrpc6v9+TlIf64jakMpeQ9VumQFVr3YiV3vcb+R7kjqvllgdBL7X8uHjAah5KI1N3iiWMd7IAq7fp+r3jMq3CgTXTL0ldOzE9xSrSqX6eur3LLMGhNM+wmv8NFz0IHnlVt+UExcqT5MPNslmXYDOjupXsm3vNSRw2D6cO7QClRcEvyFQ0HNWqrpZo+R55Fe0yoa8V9969oME0JKJHHuthN2nuQ6ZSHVmLRqpUq3y0WZ8YtiN3M2yplRc1R5124FQ7NGIpwjgoW8ZtoCcghxcJrdJ2UtY/IoHm6lrgSNnYIt9X/+EekGVriQpJ8NZa8yPBJrTNQgbPxlzSC9Ate9NZr+rRz18XJ0ZXVSip6uepksCH0W2Edlfjz0IXKk5V3elhn8B+6S08aTUpW2m0EuIspYq/zq+qWN+qZzQOeAvjNMqv2nLo58Vifn2DucM2kUxSUhPdtaMd5M2mNzziCtWJHefViXNMAS1RYtLVY8QmUNIFpcVBe8umRk2U2qs7MmmFbhCqK5rwJucwApICxxRLquc4wVYtbhn55RiZiLqRUxn4v8dAbuzjNugliyJsq3qEUzfNWn5+ThbbhsuQp6phfmkPpCSOPuIgw1n76iZdRiyOlHEkcUgds/jQ2D2AXjcP1SoxX40Vnw8DAm2aI8frsVVcBt5J7EIjx9y+l2iahSucY1tLtRK+X6FOj5Hfi9li3e8ogcsFUEGODfdK/DLU2QhKBs0xD6Xesjh+bwWaKiwwQ2KsZW2QDNh91Gn6b1CZOQeYJ4HWlh2P4SdMk7XhfjKUy9Tela3NjZj/O6FJJUiHRR4PsHrVFEiBlTJNUn05aReyGndXO+wK86FZM0PWuV81DHEID5QmAmIlPboKdTcf1KWscZMLH+epvQ7ZDLBLm5hWolnAC3OpyfQp4b9JKiG7KlS32leBMvOtqkJinL/f4svUcujhOHW1RuAtmNOt8uZjDoMyCksbYjQ8b9RcSJBb8052ZQmJ5lYhbtfa4bGVLqkU5znpEmrn35mIK62CI9xkfgmrbXlpCciFleKMioB6jFgeFno9z2z669N0HLZZnVSwUtqNp0mqjmxntVLhilI3Ji3X57HozusEMyZMF6IGuTqw3c0p/z/rP1/OLuCVH6BOi0hYW7rDm7vwn7vwV79BLf2XM0xj+mHylxMY9wUkzHX+pmXnnYBlGPsK+S+6O6VfushdxXs+Ei+MXlGXYLGeT3W2VOeCg3LbJ4SXn43FdjYjGUfge1C6u/HMJKIm7034yBPhU/c3z5SyayOmZ5pBASmvuTt05DrvxLXMFC4p7b3oJ6Co6xHcafCt6lS4Ow22inqV606EOVOrIyt5nmDZkEYH59MwnOW91apyvrSVYwQK0ErDaT6P8DZfUDcO5/mzIwcX0J3y8rKcHj7xjbKLFjED4/DY3Yvg60BKFQdovQXsvX494eDxySVq1YV1mlnhIu46U5EwHYIjw1KYUWY9tgYu5atH025dofMtE6oPTsYCdZzPzeqSG4rmRRO5Zl3zaP74BEb380l5Dq80r1chRwXLgievONmqaIBiR0edRNknoQXZfkRKj9jsSmSCA4EdU76i+bYaqgqeq4Dr4QbmA088FphrFxGu9cMj5Os1XGmebyyERlg9CVENrVpcjWHEGDLzV7diSW5AVhiY+UzSwr2ogvb7ek0dn63iXmtVr2B5EAznKvT3OCoVUZKq6unbKrT+QxNdCqbD9Q+7poF8CahAc3VuX48swu4NXDFZHAcC5ls6Ymd9sHytxAaWQ7HOdIUvSR14Rjt0KqAn0+58njT3DocQyiUD65Gk8cMYgD8biD8fiP/cFy8FrXdp1aFo6SZgqH9AdWiVliopj307D2l+shS151xKWnLewReevXOR5OeeGgh6KJJKWl9foLctLNY4a1J49NH6ydTDbixspxUSToPD9QnqJ/Jt4X9nhRubYDqdypWqnGJyEUUytS4NnygDjIrS5du+9lzDNBvCNJdBQG55W21ZbwJW4RBVjTxc/U7yVdx2aO2ichMKvV1OS9gQvnBapitIHlhsZgVjpxnyQ/yyKHWzuAo2Re1iwxEcVslN6fMgEHFiZyKqxzN1+FlvvFRkBpPodYVWg87C0DitZJFnXYwyqPY1q1eHDE+6f07WvDxvreoWQggbcBa9hLqrojWrNxZkoBS18uIsbJS7jJxci0gktE3gRkof5t9TiSNwnQVhX4EmN7h0xc1Y1c/sWNW46JDM2Kp4c7vaY/2epYkouTziHHQhaJJBx91UX/fYnrVVQ470ZgrcrJe4YC8EKk0Q5U/IIrLMlF1Hpd+qNa42xJQUUCtCid7MTerZPEyOp7/Mmv6Fzc1LnKH329aU2knA8I18bXpjgx2ZcDb9uTWu3tVVqCv1ULqlriXpWPlYSTZGfrYSf1BG9KJ9AN9MNL1Ltdt4EzUOwSzBX5nwXnUPLXEzQH6xIr8GvF0drmw1klBf0JNoaZ9LDkAHfI0cWlHQ+HohEjBZQcde6145Ic9+10rRyKPrgymjDoVVMD7gAL6nOBbcSwZtxJtphxMz+dAwIs1BuuauBQ9w46O+PgE7iW7bkOAOqkXW9QN1fBdJ96BgIWBOtWfYLsEGEbLfaA/sOFqDhWcz2yV1uInuZl7so7RnYsmZwuGldetL7BcN6dfzwPaga/035CnzyebpT3xlfBTMRxfo8moJSVqfRevtUHh9O9Lc79Ec7N/qwzab0lvNpvcHZKMm8vXp6eGj07Be4qOx/rWX2dZ1uQ/NbFrsMxiJ8C+LHkz387pMA3N2ZqjbhwmWsjzhk6E6GqfxPOxNaaYaXrSyezEemWDeXs1pIMXA97OkGnpSaQvj7raOMMwdaEVYGnJ1IEe99tPs+TtOw+4G7Cf5ApZe0Ti6jZLUzAoeJ0JO4cXQXxQPd03xypDrFB8q0xLH+z9duRvfYTBrUi3uQVZ0ob973KPUwy89TM8qZmad6aC66CEjNpqRib8urpcO/Fvmk7OaL/RoXaw0H24aJGs5oa04zkk/P8z1w2/G4Rtc9cSb2U96XKzOjKUJgNn0RvPRpvXxk7mFdYII9+B+ZDKP0kyojk/9/HCPs8DaKrZTPx+VyMAcat79WPv4ZPEesVAuwE3Ex8s+WN0HpKa2j8WTlIlYib0r4y21uCFCAcWePMK24m48+XpQV1lMr2GjEJTUsPmmOwuYpX5XsslGySzGTRBw0eENHhdgViqdGDQjVjsMaGYwPXapoxvOmJPBnjD0CX7kcaAN6LHZl/rCX72PQnsHf2gj26iZkW+CHT2bvyvm4cremNS0HQ6VV24jd8aCe4weDUZdSHQNke+wAoMaPcRN23BLw/BrqfK4J3nYgNJ3o1BjhfJePzaJJ64zZL8HGikVa9I3GPL9KCHgi9koPQr17cWdfp62Q+KecubZ7RL5Q/2ZtbS+f4qZ+XFJLJ+Wg/gjGZ2alvmSxHqku4bNVVJl2Cuu4aK9zST+K064+hjIxQauwRnkPHDN9J+vewEfjhkm95zWsNOoNoRLGUJLfZgtHsX3ePFNdA9T25WkCCe2epv7MVhBs+yiQGKvsrADggO9MGp6Vz76yXyT3pH+GTWdJa5E0rLoR73Y1SXU2sI8WRVBgGrdztxYtfwRi5OtTD8sgWcZZCH/APoleObk/VSxlO0wH9TGC7EDTGSkD05gNt0JDKBCO8qTthSl3XjeN93B6Xgi8eTERtIBolJUnfpafgCbXCpt9eCLkwcgOmM067FDCrvbGjIzl6Azy93ix4l1JtmBUwXSZJFIK9lqeZYhw/W4y2I/4VZmSbMNRSTWEyrBcov1S8VbrliQTG4vode60zbZWjEK9VF4TaXGTxG8w8ilKvYGJCIiCCZzsTyfTvfTib2hL/BkJB2JtNYXtSffXcnnrERJDmlF7u67sxYJuqcjPCVtfJ/ih0E1BOfFSkLXiduTG6wyndvkAkjhI8YT3E5YeeMS5165IxEuPesfNhZhbPcejUWYRWaVpCjwkdrGMovB3TPnGok2j8aylwO0Tt6X0u5JGU3IH4eNawjZsx51oMuZ1uOKjVf2FAXkEqKfjlmlaitTTW9TxY1xUwPLHkqIWpVMPk1vrsC3Yy6vTnCnfdYy0dBMd/bpT9hV9Y8FyfVHaWkij90amKpbuumd3P9RcriV4qMTKwIx5rtB72x+Dc64a6H4jmyWYpe9oYcX3C3v/hgjnSPyMThtJLfx87wIKpTneSkRnTHPy/nZdDr9o2uCvs5vCNSH8+fmugtsAmPZoIQMZFukGWLYZit6xQ0trEATnF6yhMNWLQrNt82aV0rqiObw/WCWYWhreA9jOVx62jQuQh2HdTpIINR/J//m71DY+6GhGxGPD0v9T/+s4jqH4SNMZRRJJ2S+pudpJWO3Bbm9bgWj9Hlo+hEwcXXloCCJD8bgzT0lW2U7YvoqZZrbzeazO0sedzMP7X37UJLP44FLa6ri9TkFRfMrFsNcGJZy3fn98kgm1q+7DaDQ1oZqouwycRukFD+0dNmOgmiRtj46JoQQiFoc6qE3zdklpmeydmfxSwdGCOeWi9Gw3aQOW5ZhXeZyJcFB346vcmAIX5xYT8lmDuyBqGnboA9tmJ3uIAKaf9iJtahB3CBCP+hRwLIJW0E0JS+dLC7A6PXFRlDIfaZNaknR6SMIn18Rr6eBjIcZBGvTFR4mWHSF/dUSlreKRZcDJbvSbSZu26NUxXCX/Tq1suxL0ixZG+kRXTcGE5zWRDC7CCE+DO4KDeMAIk6Owzgbxvh0YaSSJW49VoO9PLpOwK4Xs4BZk4gD/exj6c8+ih62RNkVwgcTBi6pXQM64vFYzDxhbML8pjt6Ms+xVFSZcxOpIZmNQQLZTk/J4J2m/is4OxDCXtqsObZnO8nnMaS6M60eHRlLXDC+L5KC7gz8SzjpzzCkwIhcG5cUOvDj0nzA2NZ5mrFMhHOavtAWCg1TyDPGCWXy9DTk3pZF+NXslE5iWeYRi3Z1zj4udN9k5if53Flx1ZfvIUu25XHePfR8EazqB3ioEYZ7aNjY2JH9+z67VkgNe3SbuSkeNo1MtR4aXfYK/r7SC+6df/pzcjE/vZgTY25F5KZFR6JFLVFhtrjzLcYkw7ganTvbEno2vRQ0xrddVV+2y8JYWlsDqiveRATthV9cHGRshU3pTlZRfQbyHdWigq/G1G2hFOs1V/nu8GFV4Sry1HuMq/KR10EJG/hXMaTkv8m+6BddDMLDWRX0jWQVjqp1aLTFyBSy152xk1uLNIY0xZQ5cjPownM2Es/nITy0c16rX25fTSgzMz+Qa9aLy8bXodKqjbbTjgelx7UoRveGcenSsf3t1zm8q6t7LfAJHKiw1Zkh6dQJ8F/5ZnzmzKEKTpQwu8YD2B2viSbXWWID2egmMogDC4tz50ZVSYKjoVUiA+7eOiuJzgdJcxsEGSzYmYNQLrMA5kOE/RZYbYAq/FzRA53SwEBXlPWWS5ST7S61YZyNyGjOTj3MAGI7zo8++XDPcYhq4n61JjGE3lTSEZKQyZqnCZQdXZ7AWRENoTkqsJMFLeXAvD4sQH1fXl/Bqsf9yd4wDOze6DDgd09q2MxWGm31os7JbucjCbvPOKqMsIaAMfx1BX4dU9SHA+KhEt+fWlipuD6dNAzIezHORmc8G53xfHTGz6MzfhnC+FBX1rUTIb0YZ6Mzno3OeD464+fRGb/0Z4Qi6Ns/zEbXCTWMA3RCDeMAnVDDOEAn1DAO0Ak1jAN0wmx0nVDDOEAn1DAO0Ak1jAN0Qg3jAJ1Qw9hHJ8g4lS9mPjMSXjL5E9dvN+Yw6EUeOjfhb7VHDPVlzX35Fw+lFHzuiZD8KY7PCXJK7Z817xCJWkeBvqT7r2ASGP4G364WB6MwHorUnjl4vMjQgXQ2MilQnTIvRdcXjPc9h+AMiUfhRwJzTFTu+QVT7DhbezDJ55Tad/3FqSezmDzI4Pfirl+5IiWuboqEZtDgkb0v+hE/bGUqbbbGcFOdzbV8L3p0iAGhcAy6vxzbYe01DryXgPk+V3BMrC6g71kaZzaqZtv5sk5Es95EI8jSWwrYY/GS6DZglrWlccEpfTGEa3Lz9L1oDu0Nwcy/pRmG8pfrNdxs35Wphc7J3t7MbT9tzwnAtAw/+gWl5rsSf/f3MwnNPjyhe3S7u725LN4ryYL91FYilnTAV2XT7ZfW7L+Y1tl/Ma3zj03r4f7hv1Zee2l9cHntpfXB5bWX1geXF6goKqgO/XX3BGYfmMCt9cLDLWhV2qaeUXHKOvT05N16/URsdIf8kuRxh+mqH3yCK7ZLy8BgLdFMAXvm5KMepIsSqTkdAJfLx2SdfQjr2Uiszxhs+00GaVvs7gYOXN8dzDHrTpJuYZ8W2JQvFDIXHY2azs9woCDr1HhwW+O00qG7ki9XN0md8nHF701b/KtyOuk/rpNULbSzEWgfqqXtOuxuoewzI7JjbxzWqNGP2Vw3YoVM/pyAEsUlaa/WSfzw6ckFNidP8TZnhTIGA6tgTEaMZJCKkCL4hCLym5atSxyXFLNG8RgdqpwxO7NbVumqLzPS8jtRcRprNQGMjpMtuvWs5PFB2pUgakjMRJPp9pZSvmJSsulU4AoYiFZEJoBYvY3ui2WsEnxtTtpKpQyqXrMGOmcBj3wTJ929Osy3GCbAF4mXJUn9BoVj4H79sTnsAJShblEYVsMXzWPEPRQaKTQuxKkSc+yxHoynouKMgkoSDHf2H/bGXJM1p000B+arBHLjo6CrnGzRHWVYcSiIJytO826BYYdUUMQsafIk2SPY4YyfDXWDhiB3rbZX9ujr2fQfV2GcvuPuyzxusOLMrYmXeUzYYWDKokqGOpJ3tMgxfriJZlEs6TedLVPiwEPn91w4XFO/lgHpF6k2LBK/nUuegMZ1reXMjT2YMlo1MvHWdZk7IW9YhqUDDbjZXiiDAjo6bqM/a3dwHqG+cjp5aMu1JV23E+gYJVGzNIUiOcJ8K7mZHDu5YOnv1YxWuohO7i7FDnWTwwZvyk85at38s49+xdFYzHyjZisPp6zGyldyS7oxZyLVhIuvwZtT7YvWWzrXnh/Hj6+kyLEe9S7FIU/O4GRPBsPjgC7HKXmTZJlD8nS6nlZqchOJPIi7Em18xTmF+eKFmyCSNkzk53VF/0OfumAiabrcNFOrVp4EZlSfBd9xOrQDHR3r+kAZ0/bDNtI30LF4jlCusBiemOP8gvcSuxY9osKcDbMEfReBIhCHKqiK4Lu2daL8LLBvJq6WNmZx7UnJPIJDZc5XMeI2JtpgwSuMyjqU4uj87B1koIOZUU0n3pgH0hoPdCchHnne7a4Vx3A+2rrmWOsVT5XD2z8WzxcUOasjBT3WX4hlOdOq8/UwPz10f99wc15LJeuWwgxmsXkfpzxd6qFCTKpwTv3PKnOu3kvdCZuz2lLSJSYWnE+WUhtcjxjyfdGN28ePoSnmhKp2yqwFyXhXRONsscxrGI4GLL5iNeeJHsMzbKrYTB1tryoac7odau6Gw0qOcfJobOCGU9rQ83ATuu4b3im67Uo49/M/4s7V8gcFu4EDLZkN/cE8t+4tj0jYrv/3m58DqVmQlhl1BxWRoavAP1lA0ZCobZnhuQNOXEPfW9ry3QLDsA9ze15gcYSgEyw/rb4UVJOmdVxMOuToPKAjFGkLe0KfC+TqV0zGigW1lgTCzHmiXVL6pmut0Y82XxNzeJQbwaPNCp+3euSXUMYm6iLq0p4Z9o+vUonf0GQCGBrWnBfmwPMMbcbryYKzfdB2t7z2zPgjUDe9jhhUL035tEEAnVM4YT5s/RIJ8dccDVqB88zUEW3lzqeRHHAKxmbB5F4PPU+1HfV2sje5507QBwvHclIoEjydTFtegtsjbu1nO0sxrWQuXVAwowseJnbKxVy6QPVzGUm9ytIUp160/j6hKMPgQ6Z/hwalvzSWRkjftNAaNZfgfq0LU2Pi3CDuSPCVNFBX/A03PRrO1PIUNZfpqk5aOqdKQjMYtaZAMSBsFkZXCFwOYaus/aj6GA9DjIU5p7XY4JV3FEqaSNs82oiIc7XfgMtMs/GoJgz2dJqVHXsN+ZkK3ZtVWmUV2MmFRWqdN1cySU4vOQsxBBjcgaKoOo/Wge0aFsFPLwOGB74+MN8PcLquIY7tTUEZx0yrQt0WnNtRAcagT2Kd0TRBcdcOlGEMhyKasBX5XRcgrQ1fCBOxoGDotEp8SDq3L4E7c0q8s+mp/v+UqZXA02wXenxJ3pmqbU3qII2X0xeRyI7vrbJkC3HmNrqmmjjF+N1J+Vww/NF+UswjwrlxTubwDVoikLU3NikIH2yTOCCsFVjnCs2i4gV+vjcNYQBDbbFolfBustFnoYSaXJmVPxBXmqZxMf+jT4VoolwgpfsifJkPw02zcWTb4+oj1JpzO9GNV61FSlu5HTd1lwCTb+LvTOBhrITTAl8KiZtmye5bieaYHkSWj7TWuY9uCySQu5eER4n1Y4xcmtqWs/SF/4Il6A29bn5zglPnaX7hzjK5Fr/IFzhVzOzWfMpWHPYIfwWm2fSqlEqardpVymESRzzQ00g8mROT+mNM4msYn/jFW4DCuGbRqGkc5lVv8h+Q8VsWlwXune29dq4DMNRVAOsTXjg+PrmNTr9Rj/Mo9cgFHOzvDF5EQZv/fiXREuwgrzsRGVQloqF4nNzzOlFk5AEOn24P697Wx3kkA/ErJpX2UAlHi8jqDHPTmlii65d+uxfTG9OBMLbXbIa+wfHQOPahK1fAZCGzFc6UQQBOxXEX8ROzS2UpEzTw9ASEF255bcuJeGzOz1aYYVyDZdG9hZTpH2MQlfIJoteOxQn9GFBKPZIMRyZ9lHL9AZT6A8aWIwv9pgeT/phcVBNHK/+F0MarP2au7jGStB9SIa5ZgAEzxqQMpI2cMVp2HHAOKD7FvFcTj9SGiJ6zlAXvuA5rR7t5aLSz6WyqP9Y0bQJbz7Z8F/CU3G+8V/LNGCmtT0PT6goCt1k6cGeDp5tFNGjIT/p7D1c4Y2Z+r8ZPWASb8HAaIzLb8VKZKVolpquw/GMzzQQDKyzkxpxbthK+37IhkvBrKf2apFtxkznDoL6F7iIfHVo6WuG9E881w7K9JllC3uJEU0I+8iRlmWKR3aS1buBoJZh1IyDPHY+WYXM3npD7wiNLYyuT+DjkXC2Lzk/crPkNj83w9A3EThK/m2Ik1zDdYnTl38zOLYrSfTempfQoAJpzXPIaoqfFAqoXrBIcxH7OvcV9ztbmmcOw2Qe8ur1lmvOKKczzGCLXYLBW3Xpb65wB/yvThUNnbFj4Bste10YFI+L3CsJqqjtGcTy/0QvoBsD8ZnfKAzjat8PF4MrL1PsoVOSqk+gBdhCIlmWsPeQ9j9OMQp8PFeIhyNDzfzDRkpl9i8OZIrlbB+wVntw1LQRUYfFYH9zIlLYsq1XgZj1xZz1x551xP7QazUapyM98KJFTOP1jwOSa6+4UC1d2wt0RqiPG1geTZifcrDPuJ76S6Sd5P+ysCzZha45HDGzZ7yqTqg4B1kw3M6bA6Y4qJGdPsGs3tPYGn9q6a+0ZEk/AHMhE98ASZxpA+KDiFKsKaCwVncMIF6VPBxSElZRowGqzNgxJ+FjWrrtWMPybvTPcfiJ3ZqVbkpcpi2Rd4IQ9gkc892YVMLOgkZ+Do/If2rPPUu1M6ofSOKGfT9DvCDbwkH3wxrfCazclDX7JBA33MMVE37VNTx/AI2Gm9iCKhkzI+MlXK4tDtFJwkwJNcbyhoIba4xFO9YHjqo298abNbhdTwXK86h5Z56YyxZTk9x04IiwgResMib0rXzeGPtwnszXWbjXrUmtL4Jk7OOXetvY0mirjsYHl4DA4OiMyLB0guX/sYlocSlfL6b4+fwR9XMJhQbAEBG1AUKBSsr4SOJoA9VETwVP+9qY4Gk6faQTPhoDPhoDPh4A/dwHDLkeoh6UG/cbNaRJwim03gskF+ooXWY/XXcUos8xGYTkbheV8FJbPo7B8GYXlz/4slxhOGAs5WwVYUfInelHNxqM6G4/qfAyqOcuDd+vBnIPXdwPLbBSWs1FYzgeywHGNqcrQU3ItcArJ3nahuVG412Q2farQZjUF1kq6pNXYSx6gCaXvVnTZkccsOTEVki8QfOL8vKNFd0inmIjGaniWbJSmZ8lGaXyaLBzxLcPxXhKqJwk2oHJZmtk4NGfj0JyPQ/N5HJov49D82Z3GGEA1iwB1kAk5186m91cneKxMuj3ltOcWb3jj/ttqpp85044XTOa6C9MSZEpkVsiENz1kWv7MmYwceNNBpku22dBgIMjslTNUrdAVZ0nbSbZMKK8lntw+AYRumE0vsLtYyuxNj0ZLfBDSISldpo2nR+wx01YS773kwXOCMeLcFgkMy1XA34x3RyDWHV4MdwaTF7DdruWIxPmiB6bMfFGXGSfD8GC2eno2CypPNKvGQsbjjBHlepcc/xHrMakgrxh7cfDv/wE=";
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(";");
@@ -4137,15 +4138,15 @@ l.vertex=!0;var m=new mxCell("Hello %USER_FULL_NAME%!\n\nAt vero eos et accusamu
new mxGeometry(0,180,800,240),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fontSize=12;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacing=10;verticalAlign=top;whiteSpace=wrap;");m.vertex=!0;var n=new mxCell("Insert System Variable",new mxGeometry(650,160,120,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;align=right;fontSize=10;whiteSpace=wrap;");n.vertex=!0;var p=new mxCell("",new mxGeometry(772,167,8,4),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");
p.vertex=!0;var q=new mxCell("%USER_FULL_NAME%\n%USER_EMAIL%\n%USER_PROFILE_COMPLETENESS%\n%USER_NUM_SUCCESS_TRADES%\n%USER_FULL_NAME%\n%USER_EMAIL%\n%USER_PROFILE_COMPLETENESS%\n%USER_NUM_SUCCESS_SELLS%",new mxGeometry(550,175,240,140),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=2;strokeColor=#dddddd;fillColor=#ffffff;align=left;verticalAlign=top;spacing=10;shadow=1;whiteSpace=wrap;");q.vertex=!0;var t=new mxCell("Message Type",new mxGeometry(0,440,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
t.vertex=!0;var u=new mxCell("Email + Push",new mxGeometry(0,460,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacingLeft=10;fontSize=16;whiteSpace=wrap;");u.vertex=!0;var v=new mxCell("",new mxGeometry(370,477,10,5),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");v.vertex=!0;var x=new mxCell("Tap target",new mxGeometry(410,440,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
-x.vertex=!0;var y=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacingLeft=10;fontSize=16;whiteSpace=wrap;");y.vertex=!0;var A=new mxCell("",new mxGeometry(780,477,10,5),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");A.vertex=!0;var B=new mxCell("Send to Group",new mxGeometry(0,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
-B.vertex=!0;var z=new mxCell("Top Management",new mxGeometry(10,543,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");z.vertex=!0;var C=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");C.vertex=!0;var E=new mxCell("Design Department",
+x.vertex=!0;var z=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacingLeft=10;fontSize=16;whiteSpace=wrap;");z.vertex=!0;var y=new mxCell("",new mxGeometry(780,477,10,5),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");y.vertex=!0;var B=new mxCell("Send to Group",new mxGeometry(0,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
+B.vertex=!0;var A=new mxCell("Top Management",new mxGeometry(10,543,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");A.vertex=!0;var C=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");C.vertex=!0;var E=new mxCell("Design Department",
new mxGeometry(10,583,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");E.vertex=!0;var F=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");F.vertex=!0;var D=new mxCell("Supply Department",new mxGeometry(10,623,14,
14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");D.vertex=!0;var K=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");K.vertex=!0;var H=new mxCell("",new mxGeometry(420,543,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
H.vertex=!0;var J=new mxCell("News",new mxGeometry(440,543,40,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");J.vertex=!0;var I=new mxCell("",new mxGeometry(420,563,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton;strokeColor=#999999;fillColor=#ffffff;");I.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#55BFE0;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");
-L.vertex=!0;var M=new mxCell("",new mxGeometry(420,583,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");M.vertex=!0;var Q=new mxCell("Documents",new mxGeometry(440,583,70,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#EFAC43;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");Q.vertex=!0;var W=new mxCell("",new mxGeometry(420,603,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
-W.vertex=!0;var O=new mxCell("Media",new mxGeometry(440,603,40,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");O.vertex=!0;var G=new mxCell("",new mxGeometry(420,623,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");G.vertex=!0;var X=new mxCell("Text",new mxGeometry(440,623,30,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#999999;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");
-X.vertex=!0;var N=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");N.vertex=!0;var da=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fillColor=#ffffff;align=center;rSize=5;strokeColor=#dddddd;fontSize=16;whiteSpace=wrap;");da.vertex=!0;var Y=new mxCell("Delete Template",new mxGeometry(630,
-680,170,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#DB524C;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");Y.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,y,A,B,z,C,E,F,D,K,H,J,I,L,M,Q,W,O,G,X,N,da,Y],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");
+L.vertex=!0;var M=new mxCell("",new mxGeometry(420,583,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");M.vertex=!0;var Q=new mxCell("Documents",new mxGeometry(440,583,70,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#EFAC43;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");Q.vertex=!0;var X=new mxCell("",new mxGeometry(420,603,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
+X.vertex=!0;var N=new mxCell("Media",new mxGeometry(440,603,40,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");N.vertex=!0;var G=new mxCell("",new mxGeometry(420,623,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");G.vertex=!0;var W=new mxCell("Text",new mxGeometry(440,623,30,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#999999;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");
+W.vertex=!0;var O=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");O.vertex=!0;var ca=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fillColor=#ffffff;align=center;rSize=5;strokeColor=#dddddd;fontSize=16;whiteSpace=wrap;");ca.vertex=!0;var Y=new mxCell("Delete Template",new mxGeometry(630,
+680,170,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#DB524C;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");Y.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,z,y,B,A,C,E,F,D,K,H,J,I,L,M,Q,X,N,G,W,O,ca,Y],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");
c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,.5,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;strokeColor=#dddddd;fillColor=none;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark as OK",new mxGeometry(0,.5,90,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");d.geometry.relative=
!0;d.geometry.offset=new mxPoint(150,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark as Violation",new mxGeometry(0,.5,120,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(250,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,.5,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");
d.geometry.relative=!0;d.geometry.offset=new mxPoint(-110,-15);d.vertex=!0;c.insert(d);d=new mxCell("Phone",new mxGeometry(40,70,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");d.vertex=!0;var b=new mxCell("",new mxGeometry(13,103,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;strokeColor=#999999;fillColor=#ffffff;");b.vertex=!0;var e=new mxCell("+38 (066) 875 67 97",new mxGeometry(40,
@@ -4159,18 +4160,18 @@ g.vertex=!0;var k=new mxCell("Company",new mxGeometry(40,140,100,20),"html=1;sha
m.vertex=!0;var n=new mxCell("ok",new mxGeometry(700,170,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;align=center;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");n.vertex=!0;var p=new mxCell("Working from",new mxGeometry(40,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");p.vertex=!0;var q=new mxCell("",new mxGeometry(13,
243,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");q.vertex=!0;var t=new mxCell("October",new mxGeometry(40,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");t.vertex=!0;var u=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;whiteSpace=wrap;");
u.geometry.relative=!0;u.geometry.offset=new mxPoint(-30,-3);u.vertex=!0;t.insert(u);u=new mxCell("2011",new mxGeometry(190,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");u.vertex=!0;var v=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;whiteSpace=wrap;");v.geometry.relative=!0;v.geometry.offset=new mxPoint(-30,
--3);v.vertex=!0;u.insert(v);v=new mxCell("Working to",new mxGeometry(400,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");v.vertex=!0;var x=new mxCell("Current time",new mxGeometry(580,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;align=right;spacingRight=5;fontColor=#55C0E0;whiteSpace=wrap;");x.vertex=!0;var y=new mxCell("",new mxGeometry(340,
-240,40,20),"shape=line;strokeWidth=2;shadow=0;dashed=0;");y.vertex=!0;var A=new mxCell("December",new mxGeometry(400,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");A.vertex=!0;var B=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;");B.geometry.relative=!0;B.geometry.offset=new mxPoint(-30,-3);B.vertex=
-!0;A.insert(B);B=new mxCell("2012",new mxGeometry(550,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");B.vertex=!0;var z=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;");z.geometry.relative=!0;z.geometry.offset=new mxPoint(-30,-3);z.vertex=!0;B.insert(z);z=new mxCell("ok",new mxGeometry(700,240,30,20),
-"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;align=center;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");z.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,y,A,B,z],800,270,"Experience")}),this.addEntry("bootstrap skills",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");c.vertex=!0;var d=new mxCell("Select fields to update status",
+-3);v.vertex=!0;u.insert(v);v=new mxCell("Working to",new mxGeometry(400,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");v.vertex=!0;var x=new mxCell("Current time",new mxGeometry(580,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;align=right;spacingRight=5;fontColor=#55C0E0;whiteSpace=wrap;");x.vertex=!0;var z=new mxCell("",new mxGeometry(340,
+240,40,20),"shape=line;strokeWidth=2;shadow=0;dashed=0;");z.vertex=!0;var y=new mxCell("December",new mxGeometry(400,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");y.vertex=!0;var B=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;");B.geometry.relative=!0;B.geometry.offset=new mxPoint(-30,-3);B.vertex=
+!0;y.insert(B);B=new mxCell("2012",new mxGeometry(550,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");B.vertex=!0;var A=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;");A.geometry.relative=!0;A.geometry.offset=new mxPoint(-30,-3);A.vertex=!0;B.insert(A);A=new mxCell("ok",new mxGeometry(700,240,30,20),
+"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;align=center;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");A.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,z,y,B,A],800,270,"Experience")}),this.addEntry("bootstrap skills",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");c.vertex=!0;var d=new mxCell("Select fields to update status",
new mxGeometry(0,.5,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#dddddd;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,.5,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;fillColor=#fdfdfd;whiteSpace=wrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-120,
-15);d.vertex=!0;c.insert(d);d=new mxCell("",new mxGeometry(13,103,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");d.vertex=!0;var b=new mxCell("Engineering",new mxGeometry(40,90,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");b.vertex=!0;var e=new mxCell("ok",new mxGeometry(700,100,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
e.vertex=!0;var g=new mxCell("",new mxGeometry(13,173,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");g.vertex=!0;var k=new mxCell("Thinking",new mxGeometry(40,160,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#FDF8E4;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");k.vertex=!0;var l=new mxCell("To Moderate",new mxGeometry(700,170,90,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#EFAC43;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
l.vertex=!0;var m=new mxCell("",new mxGeometry(13,243,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");m.vertex=!0;var n=new mxCell("Working",new mxGeometry(40,230,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");n.vertex=!0;var p=new mxCell("ok",new mxGeometry(700,240,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
p.vertex=!0;var q=new mxCell("",new mxGeometry(13,313,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");q.vertex=!0;var t=new mxCell("Sleeping",new mxGeometry(40,300,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");t.vertex=!0;var u=new mxCell("ok",new mxGeometry(700,310,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
-u.vertex=!0;var v=new mxCell("",new mxGeometry(13,383,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");v.vertex=!0;var x=new mxCell("Eating",new mxGeometry(40,370,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");x.vertex=!0;var y=new mxCell("ok",new mxGeometry(700,380,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
-y.vertex=!0;var A=new mxCell("",new mxGeometry(13,453,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");A.vertex=!0;var B=new mxCell("Walking",new mxGeometry(40,440,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");B.vertex=!0;var z=new mxCell("ok",new mxGeometry(700,450,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
-z.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,y,A,B,z],800,480,"Skills")}),this.addEntry("bootstrap chat",function(){var c=new mxCell("",new mxGeometry(0,0,400,660),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=#333333;fillColor=#ffffff;whiteSpace=wrap;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,400,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=#333333;fillColor=#333333;whiteSpace=wrap;resizeWidth=1;");d.geometry.relative=
+u.vertex=!0;var v=new mxCell("",new mxGeometry(13,383,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");v.vertex=!0;var x=new mxCell("Eating",new mxGeometry(40,370,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");x.vertex=!0;var z=new mxCell("ok",new mxGeometry(700,380,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
+z.vertex=!0;var y=new mxCell("",new mxGeometry(13,453,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");y.vertex=!0;var B=new mxCell("Walking",new mxGeometry(40,440,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");B.vertex=!0;var A=new mxCell("ok",new mxGeometry(700,450,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
+A.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,z,y,B,A],800,480,"Skills")}),this.addEntry("bootstrap chat",function(){var c=new mxCell("",new mxGeometry(0,0,400,660),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=#333333;fillColor=#ffffff;whiteSpace=wrap;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,400,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=#333333;fillColor=#333333;whiteSpace=wrap;resizeWidth=1;");d.geometry.relative=
!0;d.vertex=!0;c.insert(d);var b=new mxCell("John Boo",new mxGeometry(0,.5,30,30),"shape=ellipse;strokeColor=none;fillColor=#f0f0f0;labelPosition=right;align=left;spacingLeft=10;fontColor=#f0f0f0;html=1;");b.geometry.relative=!0;b.geometry.offset=new mxPoint(15,-15);b.vertex=!0;d.insert(b);var e=new mxCell("",new mxGeometry(.5,.5,20,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.user;strokeColor=none;fillColor=#999999;");e.geometry.relative=!0;e.geometry.offset=new mxPoint(-10,-10);e.vertex=
!0;b.insert(e);b=new mxCell("Michael Robinson",new mxGeometry(1,.5,30,30),"shape=ellipse;strokeColor=none;fillColor=#f0f0f0;labelPosition=left;align=right;spacingRight=10;fontColor=#f0f0f0;html=1;");b.geometry.relative=!0;b.geometry.offset=new mxPoint(-45,-15);b.vertex=!0;d.insert(b);d=new mxCell("",new mxGeometry(.5,.5,20,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.user;strokeColor=none;fillColor=#999999;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-10,-10);d.vertex=!0;b.insert(d);
d=new mxCell("15 September 2013",new mxGeometry(0,0,400,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=none;fillColor=#fdfdfd;fontColor=#999999;whiteSpace=wrap;resizeWidth=1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(0,75);d.vertex=!0;c.insert(d);d=new mxCell("Hi man!",new mxGeometry(0,0,80,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=none;fillColor=#E0F0D6;align=left;spacingLeft=15;whiteSpace=wrap;");d.geometry.relative=
@@ -4361,17 +4362,17 @@ this.addPalette("eipMessaging Systems","EIP / Messaging Systems",a||!1,mxUtils.b
70,90,"","Smart Proxy",null,null,this.getTagsForStencil("mxgraph.eip","smart_proxy","eip enterprise integration pattern system management ").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.test_message;fillColor=#c0f5a9;strokeColor=#000000;",150,90,"","Test Message",null,null,this.getTagsForStencil("mxgraph.eip","test_message","eip enterprise integration pattern system management ").join(" ")),
this.createVertexTemplateEntry("strokeWidth=2;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.wire_tap;fillColor=#c0f5a9;strokeColor=#000000;",150,90,"","Wire Tap",null,null,this.getTagsForStencil("mxgraph.eip","wire_tap","eip enterprise integration pattern system management ").join(" "))])}})();
(function(){Sidebar.prototype.addElectricalPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;shadow=0;dashed=0;align=center;fillColor=#ffffff;html=1;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;strokeWidth=1;"+mxConstants.STYLE_SHAPE,c=a+"=mxgraph.electrical.abstract.",f=a+"=mxgraph.electrical.capacitors.",d="fillColor=#000000;"+a+"=mxgraph.electrical.diodes.",b=a+"=mxgraph.electrical.inductors.",e=a+"=mxgraph.electrical.miscellaneous.",g=a+"=mxgraph.electrical.electro-mechanical.",
-k=a+"=mxgraph.electrical.logic_gates.",l=a+"=mxgraph.electrical.mosfets1.",m=a+"=mxgraph.electrical.transistors.",n=a+"=mxgraph.electrical.opto_electronics.",p=a+"=mxgraph.electrical.plc_ladder.",q=a+"=mxgraph.electrical.radio.",t=a+"=mxgraph.electrical.resistors.",u=a+"=mxgraph.electrical.signal_sources.",v=a+"=mxgraph.electrical.thermionic_devices.",x=a+"=mxgraph.electrical.waveforms.",y="perimeter=ellipsePerimeter;"+a+"=mxgraph.electrical.instruments.",A=a+"=mxgraph.electrical.iec_logic_gates.",
-B=a+"=mxgraph.electrical.rot_mech.",z=a+"=mxgraph.electrical.transmission.";this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(k+"and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"buffer;",100,60,"","Buffer",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","buffer","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+
+k=a+"=mxgraph.electrical.logic_gates.",l=a+"=mxgraph.electrical.mosfets1.",m=a+"=mxgraph.electrical.transistors.",n=a+"=mxgraph.electrical.opto_electronics.",p=a+"=mxgraph.electrical.plc_ladder.",q=a+"=mxgraph.electrical.radio.",t=a+"=mxgraph.electrical.resistors.",u=a+"=mxgraph.electrical.signal_sources.",v=a+"=mxgraph.electrical.thermionic_devices.",x=a+"=mxgraph.electrical.waveforms.",z="perimeter=ellipsePerimeter;"+a+"=mxgraph.electrical.instruments.",y=a+"=mxgraph.electrical.iec_logic_gates.",
+B=a+"=mxgraph.electrical.rot_mech.",A=a+"=mxgraph.electrical.transmission.";this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(k+"and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"buffer;",100,60,"","Buffer",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","buffer","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+
"d_type_flip-flop;",100,80,"","D Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"d_type_flip-flop_with_clear;",100,90,"","D Type Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_flip-flop_with_clear","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"d_type_rs_flip-flop;",100,100,"","D Type RS Flip-Flop",null,
null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_rs_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"inverter;",100,60,"","Inverter",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverter","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"inverting_contact;",5,5,"","Inverting Contact",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverting_contact","electrical logic gate ").join(" ")),
this.createVertexTemplateEntry(k+"jk_flip-flop;",100,80,"","JK Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"jk_flip-flop_with_clear;",100,90,"","JK Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop_with_clear","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"jk_flip-flop_with_sr;",100,100,"","JK Flip-Flop With SR",
null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop_with_sr","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"nand;",100,60,"","NAND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","nand","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"nor;",100,60,"","NOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","nor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"or;",100,
60,"","OR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","or","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"rs_latch;",100,80,"","RS Latch",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","rs_latch","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"synchronous_rs_latch;",100,80,"","RS Latch (Synchronous)",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","synchronous_rs_latch","electrical logic gate ").join(" ")),
this.createVertexTemplateEntry(k+"schmitt_trigger;",100,60,"","Schmitt Trigger",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","schmitt_trigger","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"t_type_flip-flop;",100,80,"","T Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","t_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xnor;",100,60,"","XNOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
-"xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xor;",100,60,"","XOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(A+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"nand;",66,80,"","NAND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
-"nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"nor;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"not;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
-"xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" "))]);this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(t+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+
+"xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xor;",100,60,"","XOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(y+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"nand;",66,80,"","NAND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
+"nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"nor;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"not;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
+"xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" "))]);this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(t+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+
"resistor_2;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"potentiometer_1;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"potentiometer_2;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_2",
"electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"trimmer_pot_1;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"trimmer_pot_2;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"trimmer_resistor_1;",100,65.5,
"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"trimmer_resistor_2;",100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"variable_resistor_1;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
@@ -4437,9 +4438,9 @@ this.createVertexTemplateEntry(u+"dependent_source_1;",60,60,"","Dependent",null
"p-channel_jfet_1","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"n-channel_mosfet_1;",95,100,"","MOSFET (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","n-channel_mosfet_1","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"p-channel_mosfet_1;",95,100,"","MOSFET (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","p-channel_mosfet_1","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"mosfet_ic_n;",
95,100,"","MOSFET Inductive Channel (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","mosfet_ic_n","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"mosfet_ic_p;",95,100,"","MOSFET Inductive Channel (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","mosfet_ic_p","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"mosfet_n_no_bulk;",95,100,"","MOSFET No Bulk (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors",
"mosfet_n_no_bulk","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"mosfet_p_no_bulk;",95,100,"","MOSFET No Bulk (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","mosfet_p_no_bulk","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"p-channel_mosfet_1;",95,100,"","MOSFET (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","p-channel_mosfet_1","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"dual_gate_mosfet_n;",
-95,100,"","Dual Gate MOSFET (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","dual_gate_mosfet_n","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"dual_gate_mosfet_p;",95,100,"","Dual Gate MOSFET (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","dual_gate_mosfet_p","electrical transistor ").join(" "))]);this.addPaletteFunctions("electricalInstruments","Electrical / Instruments",!1,[this.createVertexTemplateEntry(y+"ampermeter;",90,
-90,"","Ampermeter",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","ampermeter","electrical instrument ").join(" ")),this.createVertexTemplateEntry(y+"galvanometer;",90,90,"","Galvanometer",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","galvanometer","electrical instrument ").join(" ")),this.createVertexTemplateEntry(y+"oscilloscope;",90,90,"","Oscilloscope",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","oscilloscope","electrical instrument ").join(" ")),
-this.createVertexTemplateEntry(y+"signal_generator;",90,90,"","Signal Generator",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","signal_generator","electrical instrument ").join(" ")),this.createVertexTemplateEntry(y+"voltmeter;",90,90,"","Voltmeter",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","voltmeter","electrical instrument ").join(" "))]);this.addPaletteFunctions("electricalMisc","Electrical / Misc",!1,[this.createVertexTemplateEntry(q+"aerial_-_antenna_1;",
+95,100,"","Dual Gate MOSFET (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","dual_gate_mosfet_n","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"dual_gate_mosfet_p;",95,100,"","Dual Gate MOSFET (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","dual_gate_mosfet_p","electrical transistor ").join(" "))]);this.addPaletteFunctions("electricalInstruments","Electrical / Instruments",!1,[this.createVertexTemplateEntry(z+"ampermeter;",90,
+90,"","Ampermeter",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","ampermeter","electrical instrument ").join(" ")),this.createVertexTemplateEntry(z+"galvanometer;",90,90,"","Galvanometer",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","galvanometer","electrical instrument ").join(" ")),this.createVertexTemplateEntry(z+"oscilloscope;",90,90,"","Oscilloscope",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","oscilloscope","electrical instrument ").join(" ")),
+this.createVertexTemplateEntry(z+"signal_generator;",90,90,"","Signal Generator",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","signal_generator","electrical instrument ").join(" ")),this.createVertexTemplateEntry(z+"voltmeter;",90,90,"","Voltmeter",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","voltmeter","electrical instrument ").join(" "))]);this.addPaletteFunctions("electricalMisc","Electrical / Misc",!1,[this.createVertexTemplateEntry(q+"aerial_-_antenna_1;",
80,100,"","Antenna",null,null,this.getTagsForStencil("mxgraph.electrical.radio","aerial_-_antenna_1","electrical radio audio ").join(" ")),this.createVertexTemplateEntry(q+"aerial_-_antenna_2;",79,100,"","Antenna",null,null,this.getTagsForStencil("mxgraph.electrical.radio","aerial_-_antenna_2","electrical radio audio ").join(" ")),this.createVertexTemplateEntry(q+"loop_antenna;",64.8,69.78,"","Loop Antenna",null,null,this.getTagsForStencil("mxgraph.electrical.radio","loop_antenna","electrical radio audio ").join(" ")),
this.createVertexTemplateEntry(e+"loop_antenna",100,100,"","Loop Antenna",null,null,this.getTagsForStencil("mxgraph.electrical.signal_sources","loop antenna","electrical ").join(" ")),this.createVertexTemplateEntry(mxConstants.STYLE_SHAPE+"=mxgraph.electrical.electro-mechanical.motor_1;html=1;shadow=0;dashed=0;fillColor=#ffffff;align=center;fontSize=30;strokeColor=#000000;strokeWidth=1;",100,60,"M","Electrical Motor",null,null,this.getTagsForStencil("mxgraph.electrical.electro-mechanical","motor_1",
"electrical switch relay ").join(" ")),this.createVertexTemplateEntry(mxConstants.STYLE_SHAPE+"=mxgraph.electrical.electro-mechanical.motor_2;html=1;shadow=0;dashed=0;fillColor=#ffffff;align=center;fontSize=30;strokeColor=#000000;strokeWidth=1;",100,60,"","Motor Armature",null,null,this.getTagsForStencil("mxgraph.electrical.electro-mechanical","motor_2","electrical switch relay ").join(" ")),this.createVertexTemplateEntry(e+"co-ax;",40,60,"","Co-Ax",null,null,this.getTagsForStencil("mxgraph.electrical.miscellaneous",
@@ -4505,17 +4506,17 @@ this.createVertexTemplateEntry(B+"verticalLabelPosition=bottom;shadow=0;dashed=0
this.createVertexTemplateEntry(B+"clutch_2;",90,60,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"delayed_action;",72,50,"","Delayed Action",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","delayed action","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"manual_control;",50,50,"","Manual Control",
null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","manual control","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"blocking_device;",100,15,"","Blocking Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","blocking device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"latching_device;",100,22,"","Latching Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
"latching device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"mechanical_interlock;",100,30,"","Mechanical Interlock",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","mechanical interlock","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"automatic_return;",100,12,"","Automatic Return",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","automatic_return",
-"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"detent;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);var C=[this.createVertexTemplateEntry(z+"bus_width;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+
-"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"cable_group;",130,130,"","Cable Group",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,
-this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;fillColor=#ffffff;strokeColor=#000000;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;",
-10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"terminal_3_phase;",43,10,"","Terminal 3 Phase",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;fillColor=#ffffff;strokeColor=#000000;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontColor=#000000;fontSize=50;fontStyle=1;perimeter=ellipsePerimeter;",
-130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"line_cable;",130,60,"","Line/Cable",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line cable","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"anticreepage_device;",130,88,"","Anticreepage Device",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"anticreepage device","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"testPoint;",60,130,"","Test Point",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","test point","electrical transmission paths bus buses").join(" ")),this.createEdgeTemplateEntry("endArrow=none;html=1;strokeColor=#000000;strokeWidth=1;",100,0,"","Transmission Path",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","transmission path").join(" ")),this.createEdgeTemplateEntry("endArrow=classicThin;html=1;strokeColor=#000000;strokeWidth=1;endSize=20;",
-100,0,"","Direction of Flow",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","direction flow").join(" ")),this.createVertexTemplateEntry(z+"straightBus;",90,130,"","Straight Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","straight bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeColor=#000000;strokeWidth=1;fillColor=#FFFFFF;",
+"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"detent;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);var C=[this.createVertexTemplateEntry(A+"bus_width;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+
+"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"cable_group;",130,130,"","Cable Group",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,
+this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;fillColor=#ffffff;strokeColor=#000000;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;",
+10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"terminal_3_phase;",43,10,"","Terminal 3 Phase",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;fillColor=#ffffff;strokeColor=#000000;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontColor=#000000;fontSize=50;fontStyle=1;perimeter=ellipsePerimeter;",
+130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"line_cable;",130,60,"","Line/Cable",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line cable","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"anticreepage_device;",130,88,"","Anticreepage Device",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"anticreepage device","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"testPoint;",60,130,"","Test Point",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","test point","electrical transmission paths bus buses").join(" ")),this.createEdgeTemplateEntry("endArrow=none;html=1;strokeColor=#000000;strokeWidth=1;",100,0,"","Transmission Path",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","transmission path").join(" ")),this.createEdgeTemplateEntry("endArrow=classicThin;html=1;strokeColor=#000000;strokeWidth=1;endSize=20;",
+100,0,"","Direction of Flow",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","direction flow").join(" ")),this.createVertexTemplateEntry(A+"straightBus;",90,130,"","Straight Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","straight bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeColor=#000000;strokeWidth=1;fillColor=#FFFFFF;",
130,130,"","Elbow Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeColor=#000000;strokeWidth=1;fillColor=#FFFFFF;flipH=1;",130,130,"","Elbow Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(z+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(z+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+
+this.createVertexTemplateEntry(A+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
+this.createVertexTemplateEntry(A+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+
"eightLineBusElbow;notch=180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(a){for(var b=0;b<C.length;b++)a.appendChild(C[b](a))}))}})();
(function(){Sidebar.prototype.addErPalette=function(){var a=this,c=new mxCell("Row",new mxGeometry(0,0,40,26),"text;html=1;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");c.vertex=!0;var f=[this.addEntry("er entity relation table",function(){var d=new mxCell("Table",new mxGeometry(0,0,160,110),"swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;");
d.vertex=!0;d.insert(a.cloneCell(c,"Row 1"));d.insert(a.cloneCell(c,"Row 2"));d.insert(a.cloneCell(c,"Row 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Table")}),this.addEntry("er entity relation table section subsection",function(){var d=new mxCell("Section",new mxGeometry(0,0,140,110),"swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=22;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;");
@@ -4585,8 +4586,8 @@ p.vertex=!0;var q=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;fill
d.vertex=!0;var b=new mxCell("",new mxGeometry(50,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");b.vertex=!0;var c=new mxCell("",new mxGeometry(50,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");c.vertex=!0;var f=new mxCell("",new mxGeometry(0,50,43,40),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=north;");f.vertex=!0;var k=new mxCell("",new mxGeometry(517,50,43,40),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=south");
k.vertex=!0;var l=new mxCell("",new mxGeometry(110,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");l.vertex=!0;var m=new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");m.vertex=!0;var n=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(170,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");
p.vertex=!0;var q=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");q.vertex=!0;var t=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");t.vertex=!0;var u=new mxCell("",new mxGeometry(290,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");u.vertex=!0;var v=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");
-v.vertex=!0;var x=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");x.vertex=!0;var y=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");y.vertex=!0;var A=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");A.vertex=!0;var B=new mxCell("",new mxGeometry(410,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");
-B.vertex=!0;var z=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");z.vertex=!0;var C=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");C.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,m,n,p,q,t,u,v,x,y,A,B,z,C,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(a){for(var b=0;b<f.length;b++)a.appendChild(f[b](a))}))}})();
+v.vertex=!0;var x=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");x.vertex=!0;var z=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");z.vertex=!0;var y=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");y.vertex=!0;var B=new mxCell("",new mxGeometry(410,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");
+B.vertex=!0;var A=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");A.vertex=!0;var C=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");C.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,m,n,p,q,t,u,v,x,z,y,B,A,C,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(a){for(var b=0;b<f.length;b++)a.appendChild(f[b](a))}))}})();
(function(){Sidebar.prototype.addFlowchartPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;html=1;strokeWidth=2;shape=mxgraph.flowchart.";this.addPaletteFunctions("flowchart",mxResources.get("flowchart"),!1,[this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_1;align=left;",50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_1","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;",
50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_2","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.card;whiteSpace=wrap;",100,60,"","Card",null,null,this.getTagsForStencil("mxgraph.flowchart","card","").join(" ")),this.createVertexTemplateEntry(a+"collate;",100,100,"","Collate",null,null,this.getTagsForStencil("mxgraph.flowchart","collate","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.data;whiteSpace=wrap;",
100,60,"","Data",null,null,this.getTagsForStencil("mxgraph.flowchart","data","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.database;whiteSpace=wrap;",60,60,"","Database",null,null,this.getTagsForStencil("mxgraph.flowchart","database","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.decision;whiteSpace=wrap;",100,100,"","Decision",null,null,this.getTagsForStencil("mxgraph.flowchart","decision","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.delay;whiteSpace=wrap;",
@@ -7299,22 +7300,22 @@ c+"</body></html>");l.close()}}),l.className="geBtn",g.appendChild(l));if(!e||75
m.setAttribute("src",Editor.facebookImage);m.setAttribute("border","0");n.appendChild(m);n.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";g.appendChild(n)}7168>c.length&&(n=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(k.value);window.open(b)}catch(q){a.handleError({message:q.message||
mxResources.get("drawingTooLarge")})}}),m=document.createElement("img"),m.setAttribute("src",Editor.tweetImage),m.setAttribute("border","0"),m.style.marginBottom="5px",n.appendChild(m),n.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",g.appendChild(n))}m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(m);n=mxUtils.button(mxResources.get("copy"),
function(){k.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?m.className="geBtn gePrimaryBtn":(g.appendChild(n),n.className="geBtn gePrimaryBtn",m.className="geBtn"):(g.appendChild(l),m.className="geBtn",l.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d},GoogleSitesDialog=function(a,
-c){function f(){var a=null!=E.getTitle()?E.getTitle():this.defaultFilename;if(z.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<C.length&&(c+="&s="+C);""!=t.value&&"0"!=t.value&&(c+="&border="+t.value);""!=p.value&&(c+="&height="+p.value);c+="&pan="+(u.checked?"1":"0");c+="&zoom="+(v.checked?"1":"0");c+="&fit="+(B.checked?"1":"0");c+="&resize="+(A.checked?"1":"0");c+="&x0="+
-Number(n.value);c+="&y0="+l;b.mathEnabled&&(c+="&math=1");y.checked?c+="&edit=_blank":x.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else E.constructor==DriveFile||E.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?c+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(c+=E.getHash().substring(1),c=E.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=a&&(c+="&title="+encodeURIComponent(a)),""!=
+c){function f(){var a=null!=E.getTitle()?E.getTitle():this.defaultFilename;if(A.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<C.length&&(c+="&s="+C);""!=t.value&&"0"!=t.value&&(c+="&border="+t.value);""!=p.value&&(c+="&height="+p.value);c+="&pan="+(u.checked?"1":"0");c+="&zoom="+(v.checked?"1":"0");c+="&fit="+(B.checked?"1":"0");c+="&resize="+(y.checked?"1":"0");c+="&x0="+
+Number(n.value);c+="&y0="+l;b.mathEnabled&&(c+="&math=1");z.checked?c+="&edit=_blank":x.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else E.constructor==DriveFile||E.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?c+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(c+=E.getHash().substring(1),c=E.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=a&&(c+="&title="+encodeURIComponent(a)),""!=
p.value&&(a=parseInt(p.value)+parseInt(n.value),c+="&height="+a),m.value=c):m.value=""}var d=document.createElement("div"),b=a.editor.graph,e=b.getGraphBounds(),g=b.view.scale,k=Math.floor(e.x/g-b.view.translate.x),l=Math.floor(e.y/g-b.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";d.appendChild(m);mxUtils.br(d);this.init=
function(){m.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=k;d.appendChild(n);mxUtils.write(d,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","4");p.style.marginLeft=
"4px";p.value=Math.ceil(e.height/g);d.appendChild(p);mxUtils.br(d);e=document.createElement("hr");e.setAttribute("size","1");e.style.marginBottom="16px";e.style.marginTop="16px";d.appendChild(e);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);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=c||"";d.appendChild(q);mxUtils.br(d);mxUtils.write(d,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";d.appendChild(t);mxUtils.br(d);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("pan")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked",
-"checked");v.defaultChecked=!0;v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);d.appendChild(x);mxUtils.write(d,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";d.appendChild(y);mxUtils.write(d,mxResources.get("asNew")+" ");mxUtils.br(d);var A=
-document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";d.appendChild(A);mxUtils.write(d,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";d.appendChild(B);mxUtils.write(d,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("embed")+
-" ");var C=a.getBasenames().join(";"),E=a.getCurrentFile();mxEvent.addListener(u,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(n,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(q,"change",f);f();mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_FF||
+"checked");v.defaultChecked=!0;v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);d.appendChild(x);mxUtils.write(d,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("asNew")+" ");mxUtils.br(d);var y=
+document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";d.appendChild(B);mxUtils.write(d,mxResources.get("fit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,mxResources.get("embed")+
+" ");var C=a.getBasenames().join(";"),E=a.getCurrentFile();mxEvent.addListener(u,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(n,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(q,"change",f);f();mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_FF||
5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn gePrimaryBtn";e.appendChild(g);d.appendChild(e);this.container=d},CreateGraphDialog=function(a,c,f){var d=document.createElement("div");d.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);d.appendChild(b);var c=new Graph(b);c.setCellsCloneable(!0);c.setPanning(!0);c.setAllowDanglingEdges(!1);c.connectionHandler.select=!1;c.view.setTranslate(20,20);c.border=20;c.panningHandler.useLeftButtonForPanning=!0;var g="curved=1;";c.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))})};c.getAllConnectionConstraints=function(){return null};c.connectionHandler.marker.highlight.keepOnTop=!1;c.connectionHandler.createEdgeState=function(a){a=c.createEdge(null,null,
null,null,null,g);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var k=c.getDefaultParent(),l=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){c.connectionHandler.reset();c.clearSelection();var e=c.getCellGeometry(a),f;p(function(){f=c.insertVertex(k,null,"Entry",e.x,e.y,80,30,"rounded=1;");l(f);c.view.refresh(f);c.insertEdge(k,null,"",a,f,g)},function(){c.scrollCellToVisible(f)})});
b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),e=b.getProperty("state");c.popupMenuHandler.hideMenu();c.stopEditing(!1);var f=mxUtils.convertPoint(c.container,mxEvent.getClientX(d),mxEvent.getClientY(d));c.connectionHandler.start(e,f.x,f.y);c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});c.addCellOverlay(a,b)});c.getModel().beginUpdate();var m;try{m=c.insertVertex(k,null,"Start",0,0,80,30,"ellipse"),l(m)}finally{c.getModel().endUpdate()}var n;
"horizontalTree"==f?(n=new mxCompactTreeLayout(c),n.edgeRouting=!1,n.levelDistance=30,g="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==f?(n=new mxCompactTreeLayout(c,!1),n.edgeRouting=!1,n.levelDistance=30,g="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"verticalFlow"==f?n=new mxHierarchicalLayout(c,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?n=new mxHierarchicalLayout(c,mxConstants.DIRECTION_WEST):"organic"==f?(n=new mxFastOrganicLayout(c,!1),n.forceConstant=80):"circle"==f&&(n=
-new mxCircleLayout(c));if(null!=n){var p=function(a,b){c.getModel().beginUpdate();try{null!=a&&a(),n.execute(c.getDefaultParent(),m)}catch(A){throw A;}finally{var d=new mxMorphing(c);d.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=b&&b()}));d.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,e){q.apply(this,arguments);p()};c.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};c.connectionHandler.addListener(mxEvent.CONNECT,
+new mxCircleLayout(c));if(null!=n){var p=function(a,b){c.getModel().beginUpdate();try{null!=a&&a(),n.execute(c.getDefaultParent(),m)}catch(y){throw y;}finally{var d=new mxMorphing(c);d.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=b&&b()}));d.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,e){q.apply(this,arguments);p()};c.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};c.connectionHandler.addListener(mxEvent.CONNECT,
function(){p()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(c.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&d.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){c.clearCellOverlays();var d=a.editor.graph.getFreeInsertPoint(),d=a.editor.graph.importCells(c.getModel().getChildren(c.getDefaultParent()),d.x,d.y),e=a.editor.graph.view,f=e.getBounds(d);
f.x-=e.translate.x;f.y-=e.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(d);null!=b.parentNode&&(c.destroy(),b.parentNode.removeChild(b));a.hideDialog()});d.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(t)};this.container=d};
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+
@@ -7343,21 +7344,21 @@ a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){g.value=a.targ
f(g.value,k.value)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(a,c,f,d){function b(){if(d)f||a.hideDialog(),d(t,p.value);else{var b=p.value;if(null!=b&&0<b.length){var c=a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null;a.pickFolder(c,function(c){a.createFile(b,t,null!=q&&0<q.length?q:null,null,function(){a.hideDialog()},null,c)},c!=App.MODE_GOOGLE)}}}function e(a,
b,c){null!=u&&(u.style.backgroundColor="transparent",u.style.border="1px solid transparent");t=b;q=c;u=a;u.style.backgroundColor="#e6eff8";u.style.border="1px solid #ccd9ea"}function g(a,c,d,f,k){var g=document.createElement("div");g.className="geTemplate";g.style.height="140px";g.style.width="140px";null!=f&&0<f.length&&g.setAttribute("title",f);if(null!=a&&0<a.length){a.substring(0,a.length-4);g.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";g.style.backgroundPosition=
"center center";g.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(g,"click",function(d){v.setAttribute("disabled","disabled");g.style.backgroundColor="transparent";g.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(v.removeAttribute("disabled"),e(g,a.getText(),c),l&&b())}))});mxEvent.addListener(g,"dblclick",function(a){l=!0})}else g.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+
-mxResources.get(d)+"</td></tr></table>",k&&e(g),mxEvent.addListener(g,"click",function(a){e(g)}),mxEvent.addListener(g,"dblclick",function(a){b()});x.appendChild(g)}function k(){function a(){for(var a=!0;b<z.length&&(a||0!=mxUtils.mod(b,30));)a=z[b++],g(a.url,a.libs,a.title,a.tooltip,a.select),a=!1}var b=0;mxEvent.addListener(x,"scroll",function(b){x.scrollTop+x.clientHeight>=x.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in A){var e=document.createElement("div"),f=mxResources.get(d),
-k=A[d];null==f&&(f=d.substring(0,1).toUpperCase()+d.substring(1));18<f.length&&(f=f.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",f+" ("+k.length+")");mxUtils.write(e,e.getAttribute("title"));y.appendChild(e);null==c&&(c=e,c.style.backgroundColor="#ebf2f9");(function(d,f){mxEvent.addListener(e,"click",function(){c!=f&&(c.style.backgroundColor="",c=f,c.style.backgroundColor=
-"#ebf2f9",x.scrollTop=0,x.innerHTML="",b=0,z=A[d],a())})})(d,e)}a()}f=null!=f?f:!0;var l=document.createElement("div");l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="46px";l.appendChild(m);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":
+mxResources.get(d)+"</td></tr></table>",k&&e(g),mxEvent.addListener(g,"click",function(a){e(g)}),mxEvent.addListener(g,"dblclick",function(a){b()});x.appendChild(g)}function k(){function a(){for(var a=!0;b<A.length&&(a||0!=mxUtils.mod(b,30));)a=A[b++],g(a.url,a.libs,a.title,a.tooltip,a.select),a=!1}var b=0;mxEvent.addListener(x,"scroll",function(b){x.scrollTop+x.clientHeight>=x.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in y){var e=document.createElement("div"),f=mxResources.get(d),
+k=y[d];null==f&&(f=d.substring(0,1).toUpperCase()+d.substring(1));18<f.length&&(f=f.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",f+" ("+k.length+")");mxUtils.write(e,e.getAttribute("title"));z.appendChild(e);null==c&&(c=e,c.style.backgroundColor="#ebf2f9");(function(d,f){mxEvent.addListener(e,"click",function(){c!=f&&(c.style.backgroundColor="",c=f,c.style.backgroundColor=
+"#ebf2f9",x.scrollTop=0,x.innerHTML="",b=0,A=y[d],a())})})(d,e)}a()}f=null!=f?f:!0;var l=document.createElement("div");l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="46px";l.appendChild(m);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_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&f&&m.appendChild(n);f&&mxUtils.write(m,(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);var p=document.createElement("input");p.setAttribute("value",a.defaultFilename+n);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width=c?"220px":"450px";this.init=function(){f&&(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",
-!1,null))};f&&m.appendChild(p);var q=null,t=null,u=null,v=mxUtils.button(mxResources.get("create"),function(){b()});v.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 y=document.createElement("div");y.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
-f||(y.style.top="40px");var A={},B=1;A.basic=[{title:"blankDiagram",select:!0}];var z=A.basic;if(!c){l.appendChild(y);l.appendChild(x);var C=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!C){C=!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=A[b];null==c&&(B++,c=[],A[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
+!1,null))};f&&m.appendChild(p);var q=null,t=null,u=null,v=mxUtils.button(mxResources.get("create"),function(){b()});v.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 z=document.createElement("div");z.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
+f||(z.style.top="40px");var y={},B=1;y.basic=[{title:"blankDiagram",select:!0}];var A=y.basic;if(!c){l.appendChild(z);l.appendChild(x);var C=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!C){C=!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=y[b];null==c&&(B++,c=[],y[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
tooltip:a.getAttribute("url")})}}a=a.nextSibling}k()}})}mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&b()});m=document.createElement("div");m.style.marginTop=c?"4px":"16px";m.style.textAlign="right";m.style.position="absolute";m.style.left="40px";m.style.bottom="30px";m.style.right="40px";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);if(!c&&!a.isOffline()&&f&&null==d){var E=mxUtils.button(mxResources.get("help"),
function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});E.className="geBtn";m.appendChild(E)}c||"1"==urlParams.embed||(c=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()}),c.className="geBtn",m.appendChild(c));m.appendChild(v);a.editor.cancelFirst||null!=d||m.appendChild(n);l.appendChild(m);this.container=l},CreateDialog=function(a,c,f,d,b,e,g,k,l,m,n,p){function q(b,d,e,f){function k(){mxEvent.addListener(l,"click",function(){var b=e;if(g){var d=x.value,f=d.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>f){var b=null!=b?b:B.value,k="";b==App.MODE_GOOGLE?k=a.drive.extension:b==App.MODE_GITHUB?k=
a.gitHub.extension:b==App.MODE_DROPBOX?k=a.dropbox.extension:b==App.MODE_ONEDRIVE?k=a.oneDrive.extension:b==App.MODE_DEVICE&&(k=".xml");0<=f&&(d=d.substring(0,f));x.value=d+k}}t(e)})}var l=document.createElement("a");l.style.overflow="hidden";var m=document.createElement("img");m.src=b;m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.width="60px";m.style.height="60px";m.style.paddingBottom="6px";l.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";l.className="geBaseButton";
l.style.position="relative";l.style.margin="4px";l.style.padding="8px 8px 10px 8px";l.style.whiteSpace="nowrap";l.appendChild(m);mxClient.IS_QUIRKS&&(l.style.cssFloat="left",l.style.zoom="1");l.style.color="gray";l.style.fontSize="11px";var n=document.createElement("div");l.appendChild(n);mxUtils.write(n,d);if(null!=f&&null==a[f]){m.style.visibility="hidden";mxUtils.setOpacity(n,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(l);var v=window.setTimeout(function(){null==a[f]&&(q.stop(),l.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[f]&&(window.clearTimeout(v),mxUtils.setOpacity(n,100),m.style.visibility="",q.stop(),k())}))}else k();y.appendChild(l);++A==p&&(mxUtils.br(y),A=0)}function t(b){var c=x.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),f(c,b)}g=null!=g?g:!0;k=null!=k?k:!0;p=null!=p?p:3;var u=document.createElement("div");null==
+top:"40%",zIndex:2E9});q.spin(l);var v=window.setTimeout(function(){null==a[f]&&(q.stop(),l.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[f]&&(window.clearTimeout(v),mxUtils.setOpacity(n,100),m.style.visibility="",q.stop(),k())}))}else k();z.appendChild(l);++y==p&&(mxUtils.br(z),y=0)}function t(b){var c=x.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),f(c,b)}g=null!=g?g:!0;k=null!=k?k:!0;p=null!=p?p:3;var u=document.createElement("div");null==
d&&a.addLanguageMenu(u);var v=document.createElement("h2");mxUtils.write(v,b||mxResources.get("create"));v.style.marginTop="0px";v.style.marginBottom="24px";u.appendChild(v);mxUtils.write(u,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",c);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,
-null)};u.appendChild(x);mxUtils.br(u);var y=document.createElement("div");y.style.textAlign="center";var A=0;y.style.marginTop="6px";u.appendChild(y);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(b,mxResources.get("googleDrive")),B.appendChild(b),q(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
+null)};u.appendChild(x);mxUtils.br(u);var z=document.createElement("div");z.style.textAlign="center";var y=0;z.style.marginTop="6px";u.appendChild(z);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(b,mxResources.get("googleDrive")),B.appendChild(b),q(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
"drive")),null!=a.gitHub&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GITHUB),mxUtils.write(b,mxResources.get("github")),B.appendChild(b),q(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(b,mxResources.get("dropbox")),B.appendChild(b),a.mode==App.MODE_DROPBOX&&b.setAttribute("selected","selected"),q(IMAGE_PATH+
"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),"function"===typeof window.OneDriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(b,mxResources.get("oneDrive")),B.appendChild(b),a.mode==App.MODE_ONEDRIVE&&b.setAttribute("selected","selected"),q(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&
!mxClient.IS_IOS)b=document.createElement("option"),b.setAttribute("value",App.MODE_DEVICE),mxUtils.write(b,mxResources.get("device")),B.appendChild(b),a.mode!=App.MODE_DEVICE&&k||b.setAttribute("selected","selected"),n&&q(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);k&&isLocalStorage&&"0"!=urlParams.browser&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_BROWSER),mxUtils.write(k,mxResources.get("browser")),B.appendChild(k),a.mode==App.MODE_BROWSER&&
@@ -7375,61 +7376,44 @@ ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=
a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){p.click()});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(a){ImageDialog.filePicked(a)}).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(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),q.className="geBtn",f.appendChild(q)));mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&n(l.value)});q=mxUtils.button(mxResources.get("apply"),function(){n(l.value)});q.className="geBtn gePrimaryBtn";f.appendChild(q);a.editor.cancelFirst||f.appendChild(c);Graph.fileSupport&&(f.style.marginTop="120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",
-k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k};
-PrintDialog.prototype.create=function(a,c){function f(){t.value=Math.max(1,Math.min(k,Math.max(parseInt(t.value),parseInt(q.value))));q.value=Math.max(1,Math.min(k,Math.min(parseInt(t.value),parseInt(q.value))))}function d(c){function d(a,b,c){var d=a.getGraphBounds(),f=0,k=0,g=L.get(),l=1/a.pageScale,m=y.checked;if(m)var l=parseInt(J.value),n=parseInt(I.value),l=Math.min(g.height*n/(d.height/a.view.scale),g.width*l/(d.width/a.view.scale));else l=parseInt(x.value)/(100*a.pageScale),isNaN(l)&&(e=1/
-a.pageScale,x.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*e);g.height=Math.ceil(g.height*e);l*=e;!m&&a.pageVisible?(d=a.getPageLayout(),f-=d.x*g.width,k-=d.y*g.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,l,g,0,f,k,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var p=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=p.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,
-null,c,!0)}else{g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=m;b.appendGraph(a,l,f,k,c,!0)}return b}var e=parseInt(M.value)/100;isNaN(e)&&(e=1,M.value="100 %");var e=.75*e,f=q.value,k=t.value,g=!n.checked,m=null;g&&(g=f==l&&k==l);if(!g&&null!=a.pages&&a.pages.length){var p=0,g=a.pages.length-1;n.checked||(p=parseInt(f)-1,g=parseInt(k)-1);for(var v=p;v<=g;v++){var u=a.pages[v],f=u==a.currentPage?b:null;if(null==f){var f=a.createTemporaryGraph(b.getStylesheet()),
-k=!0,p=!1,A=null,B=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(k=u.viewState.pageVisible,p=u.viewState.mathEnabled,A=u.viewState.background,B=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(p="0"!=u.mapping.diagramMap.get("mathEnabled"),A=u.mapping.diagramMap.get("background"),B=u.mapping.diagramMap.get("backgroundImage"),B=null!=B&&0<B.length?JSON.parse(B):null);f.background=A;f.backgroundImage=null!=B?new mxImage(B.src,
-B.width,B.height):null;f.pageVisible=k;f.mathEnabled=p;var z=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?v+1:z.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(u);f.model.setRoot(u.root)}m=d(f,m,v!=g);f!=b&&f.container.parentNode.removeChild(f.container)}}else m=d(b);m.mathEnabled&&(g=m.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),
-g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),
-g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.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 b=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var k=1,l=1,m=document.createElement("div");
-m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","all");n.setAttribute("type","radio");n.setAttribute("name","pages-printdialog");m.appendChild(n);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var p=n.cloneNode(!0);n.setAttribute("checked","checked");p.setAttribute("value","range");
-m.appendChild(p);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";m.appendChild(q);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var t=q.cloneNode(!0);m.appendChild(t);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(t,
-"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",f);mxEvent.addListener(t,"change",f);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){l=g+1;q.value=l;t.value=l;break}q.setAttribute("max",k);t.setAttribute("max",k);1<k&&e.appendChild(m);var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type",
-"radio");v.setAttribute("name","printZoom");u.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));u.appendChild(g);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(){v.checked=!0});e.appendChild(u);var m=m.cloneNode(!1),y=v.cloneNode(!0);y.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");
-g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(y);m.appendChild(g);u=document.createElement("table");u.style.display="inline-block";var A=document.createElement("tbody"),B=document.createElement("tr"),z=B.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),F=C.cloneNode(!0),D=C.cloneNode(!0),K=C.cloneNode(!0),H=C.cloneNode(!0);C.style.textAlign="right";D.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var J=document.createElement("input");
-J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";E.appendChild(J);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));F.appendChild(g);mxUtils.write(D,mxResources.get("fitToBy"));var I=J.cloneNode(!0);K.appendChild(I);mxEvent.addListener(J,"focus",function(){y.checked=!0});mxEvent.addListener(I,"focus",function(){y.checked=!0});g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsDown"));H.appendChild(g);B.appendChild(C);B.appendChild(E);B.appendChild(F);z.appendChild(D);z.appendChild(K);z.appendChild(H);A.appendChild(B);A.appendChild(z);u.appendChild(A);m.appendChild(u);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var L=PageSetupDialog.addPageFormatPanel(g,
-"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="60px";m.appendChild(M);e.appendChild(m);g=document.createElement("div");g.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&&g.appendChild(m);a.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",g.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),u.className="geBtn",g.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});u.className=
-"geBtn gePrimaryBtn";g.appendChild(u);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};
-var LinkDialog=function(a,c,f,d){function b(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);m.appendChild(c)}var e=document.createElement("div");mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor=
-"transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";mxClient.IS_VML||(g.style.paddingRight="20px");var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.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('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});g.appendChild(k);g.appendChild(c);e.appendChild(g);var l=mxUtils.button(f,function(){a.hideDialog();
-d(k.value,LinkDialog.selectedDocs)});l.style.verticalAlign="middle";l.className="geBtn gePrimaryBtn";this.init=function(){k.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null);if(Graph.fileSupport){var b=e.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")&&(k.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.click());a.stopPropagation();a.preventDefault()}),!1)}};var m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);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);k.value=b}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&b(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&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){k.value=a[0].link}})});
-"undefined"!=typeof WL&&"undefined"!=typeof WL.fileDialog&&null!=a.oneDrive&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){WL.fileDialog({mode:"open",select:"single"}).then(function(a){null!=a&&null!=a.data&&null!=a.data.files&&0<a.data.files.length&&(k.value=a.data.files[0].link)},function(a){})});null!=a.gitHub&&b(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("/");k.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a}})});mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(k.value,LinkDialog.selectedDocs))});m.appendChild(l);a.editor.cancelFirst||m.appendChild(f);e.appendChild(m);this.container=e},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.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");c.appendChild(f);mxUtils.br(c);f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color="#505050";c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,
-"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(f);var d=document.createElement("input");d.setAttribute("type",
-"text");d.style.marginTop="6px";d.style.width="600px";var b=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(g.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(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
-"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
-mxEvent.addListener(d,"change",function(){0<d.value.length&&0<e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;f=document.createElement("p");f.style.marginTop=
-"14px";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("feedback"));c.appendChild(f);var l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));
-c.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst?(f.appendChild(k),f.appendChild(b)):(f.appendChild(b),f.appendChild(k));c.appendChild(f);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k},LinkDialog=function(a,c,f,d){function b(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);m.appendChild(c)}var e=document.createElement("div");mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";mxClient.IS_VML||(g.style.paddingRight="20px");var k=
+document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.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('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});g.appendChild(k);g.appendChild(c);e.appendChild(g);var l=mxUtils.button(f,function(){a.hideDialog();d(k.value,LinkDialog.selectedDocs)});l.style.verticalAlign="middle";l.className="geBtn gePrimaryBtn";this.init=function(){k.focus();
+mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null);if(Graph.fileSupport){var b=e.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")&&(k.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.click());a.stopPropagation();a.preventDefault()}),!1)}};var m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);
+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);k.value=b}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&b(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&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){k.value=a[0].link}})});"undefined"!=typeof WL&&"undefined"!=typeof WL.fileDialog&&null!=a.oneDrive&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){WL.fileDialog({mode:"open",
+select:"single"}).then(function(a){null!=a&&null!=a.data&&null!=a.data.files&&0<a.data.files.length&&(k.value=a.data.files[0].link)},function(a){})});null!=a.gitHub&&b(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("/");k.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a}})});mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(k.value,LinkDialog.selectedDocs))});
+m.appendChild(l);a.editor.cancelFirst||m.appendChild(f);e.appendChild(m);this.container=e},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.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");c.appendChild(f);mxUtils.br(c);f=document.createElement("small");f.innerHTML="v "+
+EditorUi.VERSION;f.style.color="#505050";c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),f=document.createElement("div");
+mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(f);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="600px";var b=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(g.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(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):
+a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(d,"change",function(){0<d.value.length&&0<e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});
+mxEvent.addListener(d,"keyup",function(){0<d.value.length&&e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);
+mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("feedback"));c.appendChild(f);var l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));c.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),
+function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst?(f.appendChild(k),f.appendChild(b)):(f.appendChild(b),f.appendChild(k));c.appendChild(f);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,c){var f=document.createElement("div"),d=document.createElement("h3");d.style.marginTop="0px";mxUtils.write(d,mxResources.get("revisionHistory"));f.appendChild(d);var b=document.createElement("div");b.style.position="absolute";b.style.overflow="auto";b.style.width="170px";b.style.height="378px";f.appendChild(b);var e=document.createElement("div");e.style.position="absolute";e.style.border="1px solid lightGray";e.style.left="199px";e.style.width="470px";e.style.height=
"376px";e.style.overflow="hidden";mxEvent.disableContextMenu(e);f.appendChild(e);var g=new Graph(e);g.setEnabled(!1);g.setPanning(!0);g.panningHandler.ignoreCell=!0;g.panningHandler.useLeftButtonForPanning=!0;g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;var k=0,l=null,m=0,n=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a&&null!=l&&null!=l[m]?l[m].getAttribute("name"):"pagenumber"==a?m+1:n.apply(this,arguments)};g.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-g.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(g.container)}));var p=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(),t=null,u=null,v=null,x=null,y=mxUtils.button("",function(){null!=v&&g.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 A=mxUtils.button("",function(){null!=v&&g.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var B=mxUtils.button("",function(){null!=v&&(g.maxFitScale=8,g.fit(8),g.center())});B.className=
-"geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var z=mxUtils.button("",function(){null!=v&&(g.zoomActual(),g.center())});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var C=
+g.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(g.container)}));var p=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(),t=null,u=null,v=null,x=null,z=mxUtils.button("",function(){null!=v&&g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));
+z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var y=mxUtils.button("",function(){null!=v&&g.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var B=mxUtils.button("",function(){null!=v&&(g.maxFitScale=8,g.fit(8),g.center())});B.className=
+"geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var A=mxUtils.button("",function(){null!=v&&(g.zoomActual(),g.center())});A.className="geSprite geSprite-actualsize";A.setAttribute("title",mxResources.get("actualSize"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var C=
document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=v){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(v.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"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=v&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&q.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)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var D=document.createElement("select");D.setAttribute("disabled","disabled");D.style.maxWidth="80px";D.style.position="relative";D.style.top="-2px";D.style.verticalAlign="bottom";D.style.marginRight="6px";D.style.display="none";var K=null;mxEvent.addListener(D,"change",function(a){null!=
K&&(K(a),mxEvent.consume(a))});var H=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=v&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(v.documentElement)),window.openWindow(a.getUrl()))});H.className="geBtn";H.setAttribute("disabled","disabled");var J=mxUtils.button(mxResources.get("show"),function(){null!=u&&window.open(u.getUrl())});J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");d=document.createElement("div");
d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var L=null;if(null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile)e.style.display="none",I.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));
-else if(null!=c&&0<c.length){e.style.cursor="move";var M=document.createElement("table");M.style.border="1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var Q=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var O=c.length-1;0<=O;O--){var G=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){var n=function(b){p.stop();var c=mxUtils.parseXml(b),
+else if(null!=c&&0<c.length){e.style.cursor="move";var M=document.createElement("table");M.style.border="1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var Q=document.createElement("tbody"),X=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var N=c.length-1;0<=N;N--){var G=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){var n=function(b){p.stop();var c=mxUtils.parseXml(b),
n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){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";e.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center();return a};D.style.display="none";D.innerHTML="";v=c;x=b;l=parseSelectFunction=null;m=0;if("mxfile"==
n.nodeName){c=n.getElementsByTagName("diagram");l=[];for(b=0;b<c.length;b++)l.push(c[b]);m=Math.min(k,l.length-1);0<l.length&&t(l[m]);if(1<l.length)for(D.removeAttribute("disabled"),D.style.display="",b=0;b<l.length;b++)c=document.createElement("option"),mxUtils.write(c,l[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==m&&c.setAttribute("selected","selected"),D.appendChild(c);K=function(){m=k=parseInt(D.value);t(l[k])}}else u(n);C.innerHTML="";mxUtils.write(C,
-d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));y.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");z.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(y,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(z,60)}else D.style.display=
-"none",D.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var G=document.createElement("td");G.style.padding="6px";G.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(G,mxResources.get("current")):d.toDateString()===W?mxUtils.write(G,d.toLocaleTimeString()):mxUtils.write(G,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(G);
+d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));z.removeAttribute("disabled");y.removeAttribute("disabled");B.removeAttribute("disabled");A.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(z,60);mxUtils.setOpacity(y,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(A,60)}else D.style.display=
+"none",D.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var G=document.createElement("td");G.style.padding="6px";G.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(G,mxResources.get("current")):d.toDateString()===X?mxUtils.write(G,d.toLocaleTimeString()):mxUtils.write(G,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(G);
f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){u!=b&&(p.stop(),null!=t&&(t.style.backgroundColor=""),u=b,t=f,t.style.backgroundColor="#ebf2f9",x=v=null,C.removeAttribute("title"),C.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),F.setAttribute("disabled","disabled"),E.setAttribute("disabled",
-"disabled"),y.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),mxUtils.setOpacity(y,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(z,20),p.spin(e),b.getXml(function(a){u==b&&n(a)},function(a){p.stop();D.style.display="none";D.innerHTML="";C.innerHTML="";mxUtils.write(C,
-mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){J.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Q.appendChild(f)}return f}(c[O]);null!=G&&O==c.length-1&&(L=G)}M.appendChild(Q);b.appendChild(M)}else e.style.display="none",I.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=L&&L.click()};b=mxUtils.button(mxResources.get("close"),
-function(){a.hideDialog()});b.className="geBtn";I.appendChild(D);I.appendChild(y);I.appendChild(A);I.appendChild(z);I.appendChild(B);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(E),d.appendChild(H),d.appendChild(F),d.appendChild(J)):(d.appendChild(E),d.appendChild(H),d.appendChild(F),d.appendChild(J),d.appendChild(b));f.appendChild(d);f.appendChild(I);f.appendChild(C);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),l=document.createElement("div");
+"disabled"),z.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),mxUtils.setOpacity(z,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(A,20),p.spin(e),b.getXml(function(a){u==b&&n(a)},function(a){p.stop();D.style.display="none";D.innerHTML="";C.innerHTML="";mxUtils.write(C,
+mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){J.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Q.appendChild(f)}return f}(c[N]);null!=G&&N==c.length-1&&(L=G)}M.appendChild(Q);b.appendChild(M)}else e.style.display="none",I.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=L&&L.click()};b=mxUtils.button(mxResources.get("close"),
+function(){a.hideDialog()});b.className="geBtn";I.appendChild(D);I.appendChild(z);I.appendChild(y);I.appendChild(A);I.appendChild(B);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(E),d.appendChild(H),d.appendChild(F),d.appendChild(J)):(d.appendChild(E),d.appendChild(H),d.appendChild(F),d.appendChild(J),d.appendChild(b));f.appendChild(d);f.appendChild(I);f.appendChild(C);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),l=document.createElement("div");
l.style.marginTop="0px";mxUtils.write(l,c);k.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.marginTop="10px";m.style.width="640px";m.style.height="386px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);k.appendChild(m);var n=new Graph(m);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(f);
var p=a.editor.extractGraphModel(c.documentElement,!0),q=0,t=null,u=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[q]?t[q].getAttribute("name"):"pagenumber"==a?q+1:u.apply(this,arguments)};n.getLinkForCell=function(){return null};c=mxUtils.button("",function(){n.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);f=mxUtils.button("",
function(){n.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);l=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});l.className="geSprite geSprite-fit";l.setAttribute("title",mxResources.get("fit"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);var v=mxUtils.button("",function(){n.zoomActual();n.center()});
@@ -7459,8 +7443,8 @@ for(var f=0;f<c.entries.length;f++)(function(c){var d=l.cloneNode(!1);d.style.cu
"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=c.style.width,f.style.paddingTop="12px");var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)c=document.createElement("span"),c.style.paddingRight="20px",c.appendChild(n),mxUtils.write(c," "+mxResources.get("rememberThisSetting")),
n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(c,"click",function(a){mxEvent.getSource(a)!=n&&(n.checked=!n.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(c.style.position="relative",c.style.top="-6px"),f.appendChild(c);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<k.length;c++){var d=k[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),
n.checked,!0)});p.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),t=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";var u=document.createElement("tr");q.style.width="100%";c=document.createElement("td");var p=document.createElement("td"),v=document.createElement("td"),x=mxUtils.bind(this,function(b,c,d){var e=document.createElement("input");e.type="checkbox";q.appendChild(e);e.checked=a.sidebar.isEntryVisible(d);var f=document.createElement("span");
-mxUtils.write(f,c);c=document.createElement("div");c.style.display="block";c.appendChild(e);c.appendChild(f);mxEvent.addListener(f,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return e.checked?d:null}});u.appendChild(c);u.appendChild(p);u.appendChild(v);t.appendChild(u);q.appendChild(t);for(var k=[],y=0,m=0;m<f.length;m++)for(t=0;t<f[m].entries.length;t++)y++;for(var A=[c,p,v],B=0,m=0;m<f.length;m++)(function(a){for(var b=0;b<a.entries.length;b++){var c=
-a.entries[b];k.push(x(A[Math.floor(B/(y/3))],c.title,c.id));B++}})(f[m]);d.appendChild(q);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,f.appendChild(n),c=document.createElement("span"),mxUtils.write(c," "+mxResources.get("rememberThisSetting")),f.appendChild(c),mxEvent.addListener(c,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));
+mxUtils.write(f,c);c=document.createElement("div");c.style.display="block";c.appendChild(e);c.appendChild(f);mxEvent.addListener(f,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return e.checked?d:null}});u.appendChild(c);u.appendChild(p);u.appendChild(v);t.appendChild(u);q.appendChild(t);for(var k=[],z=0,m=0;m<f.length;m++)for(t=0;t<f[m].entries.length;t++)z++;for(var y=[c,p,v],B=0,m=0;m<f.length;m++)(function(a){for(var b=0;b<a.entries.length;b++){var c=
+a.entries[b];k.push(x(y[Math.floor(B/(z/3))],c.title,c.id));B++}})(f[m]);d.appendChild(q);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,f.appendChild(n),c=document.createElement("span"),mxUtils.write(c," "+mxResources.get("rememberThisSetting")),f.appendChild(c),mxEvent.addListener(c,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));
d.appendChild(f);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<k.length;c++){var d=k[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",n.checked);a.hideDialog()});p.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}a.editor.cancelFirst?(f.appendChild(c),f.appendChild(p)):
(f.appendChild(p),f.appendChild(c));d.appendChild(f);this.container=d},PluginsDialog=function(a){function c(){if(0==b.length)d.innerHTML=mxResources.get("noPlugins");else{d.innerHTML="";for(var e=0;e<b.length;e++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var k=document.createElement("span");k.className="geSprite geSprite-delete";k.style.position="relative";k.style.cursor="pointer";k.style.top="5px";k.style.marginRight="4px";k.style.display="inline-block";f.appendChild(k);mxUtils.write(f,
b[e]);d.appendChild(f);mxUtils.br(d);mxEvent.addListener(k,"click",function(d){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+b[d]+'"?',function(){b.splice(d,1);c()})}}(e))}}}var f=document.createElement("div"),d=document.createElement("div");d.style.height="120px";d.style.overflow="auto";var b=mxSettings.getPlugins().slice();f.appendChild(d);c();var e=mxUtils.button(mxResources.get("add"),function(){var d="",e=urlParams.p;if(null!=e&&0<e.length){for(var f=e.split(";"),e=
@@ -7472,34 +7456,34 @@ k.appendChild(l);k.appendChild(m);g.appendChild(k);k=document.createElement("tr"
k=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=1==c.length?mxUtils.getValue(f.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(u);k.appendChild(l);k.appendChild(m);g.appendChild(k);e.appendChild(g);b.appendChild(e);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=
mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var d=f.getCellGeometry(c[b]);null!=d&&(d=d.clone(),f.isCellMovable(c[b])&&(0<mxUtils.trim(n.value).length&&(d.x=Number(n.value)),0<mxUtils.trim(p.value).length&&(d.y=Number(p.value))),f.isCellResizable(c[b])&&(0<mxUtils.trim(q.value).length&&(d.width=Number(q.value)),0<mxUtils.trim(t.value).length&&(d.height=Number(t.value))),f.getModel().setGeometry(c[b],d));0<mxUtils.trim(u.value).length&&
f.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[c[b]])}}finally{f.getModel().endUpdate()}});mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&v.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(d),e.appendChild(v)):(e.appendChild(v),e.appendChild(d));b.appendChild(e);this.container=b},LibraryDialog=function(a,c,f,d,b,e){function g(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 k(b,c,d,e,f,l,m,p,q){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=m||null==v[b]){var y=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));I.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};t.style.backgroundImage=
+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 k(b,c,d,e,f,l,m,p,q){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=m||null==v[b]){var z=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));I.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};t.style.backgroundImage=
"";u.style.display="none";var C=f,D=l;if(f>a.maxImageSize||l>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=F;l*=F}C>D?(D=Math.round(100*D/C),C=100):(C=Math.round(100*C/D),D=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 H=document.createElement("img");H.setAttribute("src",B.convert(b));H.style.width=C+"px";H.style.height=D+"px";H.style.margin="10px";H.style.paddingBottom=Math.floor((100-D)/2)+"px";H.style.paddingLeft=Math.floor((100-C)/2)+"px";E.appendChild(H)}else if(null!=m){var K=a.stringToCells(a.editor.graph.decompress(m.xml));0<K.length&&(a.sidebar.createThumb(K,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.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(a){mxEvent.consume(a)});null==b&&null!=m&&(J.style.position="relative");(function(a,b,c){mxEvent.addListener(J,"click",function(d){v[b]=null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==b||null!=n[e].xml&&null!=c&&n[e].xml==
c.xml){n.splice(e,1);break}E.parentNode.removeChild(a);0==n.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(d)});mxEvent.addListener(J,"dblclick",function(a){mxEvent.consume(a)})})(E,b,m);E.appendChild(J);E.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow=
-"hidden";I.style.textAlign="center";var L=null;null!=b?(L={data:b,w:f,h:l,title:q},null!=p&&(L.aspect=p),v[b]=H,n.push(L)):null!=m&&(m.aspect="fixed",n.push(m),L=m);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});y();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<
-document.documentMode)){var c=new FilenameDialog(a,L.title||"",mxResources.get("ok"),function(a){null!=a&&(L.title=a,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==L.title||0==L.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",
-!1,null);A=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";L.title=I.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",K);mxEvent.addListener(E,"dblclick",K);t.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=m&&(J.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=m.xml&&a.dataTransfer.setData("Text",m.xml);x=g(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);J.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility="",I.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(a.spinner.stop(),C=mxUtils.parseXml(b),"mxlibrary"==C.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(C.documentElement));
-if(null!=D&&0<D.length)for(var M=0;M<D.length;M++)null!=D[M].xml?k(null,null,0,0,0,0,D[M]):k(D[M].data,null,0,0,D[M].w,D[M].h,null,"fixed",D[M].title);f=!0}else if("mxfile"==C.documentElement.nodeName){for(var Q=C.documentElement.getElementsByTagName("diagram"),M=0;M<Q.length;M++){var D=mxUtils.getTextContent(Q[M]),K=a.stringToCells(a.editor.graph.decompress(D)),ba=a.editor.graph.getBoundingBoxFromGeometry(K);k(null,null,0,0,0,0,{xml:D,w:ba.width,h:ba.height})}f=!0}}catch(T){}f||(a.spinner.stop(),
-a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(T){}return null}function l(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();z=!1;y=g(b);if(null!=x)null!=y&&y<t.children.length?(n.splice(y>x?y-1:y,0,n.splice(x,1)[0]),t.insertBefore(t.children[x],t.children[y])):(n.push(n.splice(x,1)[0]),t.appendChild(t.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,
-0,0,a.maxImageSize,C(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){k(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];f=document.createElement("div");f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace=
-"nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==b||b.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==b||b.isRenamable())q.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",
-!1,null)};p.appendChild(q);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==n.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"));f.appendChild(u);var v={},x=null,y=null,A=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",c);mxEvent.addListener(t,"pointerdown",c);mxEvent.addListener(t,"touchstart",c);var B=new mxUrlConverter,z=!1;if(null!=d)for(c=0;c<d.length;c++)p=d[c],k(p.data,null,0,0,
-p.w,p.h,p,p.aspect,p.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 C=function(b){return function(c,d,e,f,g,l,m,n,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&&(k(c.responseText,d,e,f,g,l,m,"fixed",mxEvent.isAltDown(b)?
-null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(k(c,d,e,f,g,l,m,"fixed",mxEvent.isAltDown(b)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",l);mxEvent.addListener(t,"drop",m);mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",m);f.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);window.chrome&&chrome.app&&chrome.app.runtime?q.setAttribute("disabled","disabled"):(p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(n),c=q.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")}),p.setAttribute("id","btnDownload"),p.className="geBtn",d.appendChild(p));var E=document.createElement("input");E.setAttribute("multiple","multiple");E.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(E,"change",function(b){z=!1;a.importFiles(E.files,0,0,a.maxImageSize,function(a,c,d,e,f,k,g,l,m){C(b)(a,c,d,e,f,k,g,l,m);E.value=""});t.scrollTop=t.scrollHeight}),p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);E.click()}),p.setAttribute("id",
-"btnAddImage"),p.className="geBtn",d.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){z=!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))}k(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";d.appendChild(p);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,
-c,d,e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(q.value,n,b,e)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);f.appendChild(d);this.container=f},EditShapeDialog=function(a,c,f,d,b){d=null!=d?d:300;b=null!=b?b:120;var e,g,k=document.createElement("table"),l=document.createElement("tbody");k.style.cellPadding="4px";e=document.createElement("tr");g=
-document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";mxUtils.write(g,f);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=d-200+"px";m.style.height=b+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};g.appendChild(m);e.appendChild(g);g=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=b+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var n=new Graph(f);n.setEnabled(!1);var p=a.editor.graph.cloneCells([c])[0];n.addCells([p]);f=n.view.getState(p);var q="";null!=f.shape&&null!=f.shape.stencil&&(q=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(m,q||"");f=n.getGraphBounds();b=Math.min(160/f.width,(b-40)/f.height);n.view.scaleAndTranslate(b,
-20/b-f.x,20/b-f.y);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),
-f.className="geBtn",g.appendChild(f));var t=function(b,c,d){var e=m.value,f=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(f.documentElement),f=f.documentElement.getElementsByTagName("parsererror");if(null!=f&&0<f.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),f=!b.model.contains(c),!d||f||e!=q){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(f){var k=a.editor.graph.getInsertPoint();c.geometry.x=k.x;
-c.geometry.y=k.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(z){throw z;}finally{b.getModel().endUpdate()}f&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){t(n,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);a.editor.cancelFirst||g.appendChild(b);e.appendChild(g);l.appendChild(e);k.appendChild(l);this.container=
-k},CustomDialog=function(a,c,f,d,b,e){var g=document.createElement("div");g.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="right";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);if(!a.isOffline()&&null!=e){var l=mxUtils.button(mxResources.get("help"),function(){window.open(e)});l.className="geBtn";c.appendChild(l)}b=mxUtils.button(b||mxResources.get("ok"),
-function(){a.hideDialog();null!=f&&f()});c.appendChild(b);b.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);g.appendChild(c);this.cancelBtn=k;this.okButton=b;this.container=g};(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":
+"hidden";I.style.textAlign="center";var L=null;null!=b?(L={data:b,w:f,h:l,title:q},null!=p&&(L.aspect=p),v[b]=H,n.push(L)):null!=m&&(m.aspect="fixed",n.push(m),L=m);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(a))});z();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<
+document.documentMode)){var c=new FilenameDialog(a,L.title||"",mxResources.get("ok"),function(a){null!=a&&(L.title=a,z())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==L.title||0==L.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",
+!1,null);y=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";L.title=I.innerHTML;z()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",K);mxEvent.addListener(E,"dblclick",K);t.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=m&&(J.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=m.xml&&a.dataTransfer.setData("Text",m.xml);x=g(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);J.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility="",I.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else A||(A=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(a.spinner.stop(),C=mxUtils.parseXml(b),"mxlibrary"==C.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(C.documentElement));
+if(null!=D&&0<D.length)for(var M=0;M<D.length;M++)null!=D[M].xml?k(null,null,0,0,0,0,D[M]):k(D[M].data,null,0,0,D[M].w,D[M].h,null,"fixed",D[M].title);f=!0}else if("mxfile"==C.documentElement.nodeName){for(var Q=C.documentElement.getElementsByTagName("diagram"),M=0;M<Q.length;M++){var D=mxUtils.getTextContent(Q[M]),K=a.stringToCells(a.editor.graph.decompress(D)),Z=a.editor.graph.getBoundingBoxFromGeometry(K);k(null,null,0,0,0,0,{xml:D,w:Z.width,h:Z.height})}f=!0}}catch(T){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(T){}return null}
+function l(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();A=!1;z=g(b);if(null!=x)null!=z&&z<t.children.length?(n.splice(z>x?z-1:z,0,n.splice(x,1)[0]),t.insertBefore(t.children[x],t.children[z])):(n.push(n.splice(x,1)[0]),t.appendChild(t.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(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){k(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];f=document.createElement("div");f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+
+":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==b||b.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==b||b.isRenamable())q.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);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==n.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"));f.appendChild(u);var v={},x=null,z=null,y=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",c);mxEvent.addListener(t,"pointerdown",c);mxEvent.addListener(t,"touchstart",c);var B=new mxUrlConverter,A=!1;if(null!=d)for(c=0;c<d.length;c++)p=d[c],k(p.data,null,0,0,p.w,p.h,p,p.aspect,p.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 C=function(b){return function(c,d,e,f,g,l,m,n,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&&(k(c.responseText,d,e,f,g,l,m,"fixed",mxEvent.isAltDown(b)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):
+(k(c,d,e,f,g,l,m,"fixed",mxEvent.isAltDown(b)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",l);mxEvent.addListener(t,"drop",m);mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",m);f.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&
+d.appendChild(c);window.chrome&&chrome.app&&chrome.app.runtime?q.setAttribute("disabled","disabled"):(p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(n),c=q.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")}),p.setAttribute("id","btnDownload"),p.className="geBtn",d.appendChild(p));
+var E=document.createElement("input");E.setAttribute("multiple","multiple");E.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(E,"change",function(b){A=!1;a.importFiles(E.files,0,0,a.maxImageSize,function(a,c,d,e,f,k,g,l,m){C(b)(a,c,d,e,f,k,g,l,m);E.value=""});t.scrollTop=t.scrollHeight}),p=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);E.click()}),p.setAttribute("id","btnAddImage"),p.className="geBtn",d.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),
+function(){null!=y&&(y(),y=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){A=!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))}k(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";d.appendChild(p);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,c,d,e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=y&&
+(y(),y=null);this.saveBtnClickHandler(q.value,n,b,e)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);f.appendChild(d);this.container=f},EditShapeDialog=function(a,c,f,d,b){d=null!=d?d:300;b=null!=b?b:120;var e,g,k=document.createElement("table"),l=document.createElement("tbody");k.style.cellPadding="4px";e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";mxUtils.write(g,
+f);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=d-200+"px";m.style.height=b+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};g.appendChild(m);e.appendChild(g);g=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=
+b+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var n=new Graph(f);n.setEnabled(!1);var p=a.editor.graph.cloneCells([c])[0];n.addCells([p]);f=n.view.getState(p);var q="";null!=f.shape&&null!=f.shape.stencil&&(q=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(m,q||"");f=n.getGraphBounds();b=Math.min(160/f.width,(b-40)/f.height);n.view.scaleAndTranslate(b,20/b-f.x,20/b-f.y);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");
+g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),f.className="geBtn",g.appendChild(f));var t=function(b,c,d){var e=m.value,f=mxUtils.parseXml(e),
+e=mxUtils.getPrettyXml(f.documentElement),f=f.documentElement.getElementsByTagName("parsererror");if(null!=f&&0<f.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),f=!b.model.contains(c),!d||f||e!=q){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(f){var k=a.editor.graph.getInsertPoint();c.geometry.x=k.x;c.geometry.y=k.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(A){throw A;
+}finally{b.getModel().endUpdate()}f&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){t(n,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);a.editor.cancelFirst||g.appendChild(b);e.appendChild(g);l.appendChild(e);k.appendChild(l);this.container=k},CustomDialog=function(a,c,f,d,b,e){var g=document.createElement("div");g.appendChild(c);c=document.createElement("div");
+c.style.marginTop="16px";c.style.textAlign="right";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);if(!a.isOffline()&&null!=e){var l=mxUtils.button(mxResources.get("help"),function(){window.open(e)});l.className="geBtn";c.appendChild(l)}b=mxUtils.button(b||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f()});c.appendChild(b);b.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);
+g.appendChild(c);this.cancelBtn=k;this.okButton=b;this.container=g};(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==":
IMAGE_PATH+"/spin.gif";Editor.tweetImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARlJREFUeNpi/P//PwM1ABMDlQDVDGKAeo0biMXwKOMD4ilA/AiInwDxfCBWBeIgINYDmwE1yB2Ir0Alsbl6JchONPwNiC8CsTPIDJjXuIBYG4gPAnE8EDMjGaQCxGFYLOAEYlYg/o3sNSkgfo1k2ykgLgRiIyAOwOIaGE6CmwE1SA6IZ0BNR1f8GY9BXugG2UMN+YtHEzr+Aw0OFINYgHgdCYaA8HUgZkM3CASEoYb9ItKgapQkhGQQKC0dJdKQx1CLsRoEArpAvAuI3+Ix5B8Q+2AkaiyZVgGId+MwBBQhKVhzB9QgKyDuAOJ90BSLzZBzQOyCK5uxQNnXoGlJHogfIOU7UCI9C8SbgHgjEP/ElRkZB115BBBgAPbkvQ/azcC0AAAAAElFTkSuQmCC":
@@ -7510,7 +7494,7 @@ Editor.configure=function(a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.
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 c=Editor.prototype.getGraphXml;
Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};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(y){}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"==
+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(z){}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 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 d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&
@@ -7546,7 +7530,24 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[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(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 t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return t.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.6.4";EditorUi.compactUi="atlas"!=uiTheme;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=
+[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 t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return t.apply(this,arguments)};
+PrintDialog.prototype.create=function(a,b){function c(){t.value=Math.max(1,Math.min(g,Math.max(parseInt(t.value),parseInt(q.value))));q.value=Math.max(1,Math.min(g,Math.min(parseInt(t.value),parseInt(q.value))))}function d(b){function c(a,b,c){var e=a.getGraphBounds(),f=0,k=0,g=da.get(),l=1/a.pageScale,m=Q.checked;if(m)var l=parseInt(R.value),n=parseInt(V.value),l=Math.min(g.height*n/(e.height/a.view.scale),g.width*l/(e.width/a.view.scale));else l=parseInt(M.value)/(100*a.pageScale),isNaN(l)&&(d=
+1/a.pageScale,M.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);l*=d;!m&&a.pageVisible?(e=a.getPageLayout(),f-=e.x*g.width,k-=e.y*g.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,l,g,0,f,k,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var p=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=p.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,
+null,c,!0)}else{g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=m;b.appendGraph(a,l,f,k,c,!0)}return b}var d=parseInt(Z.value)/100;isNaN(d)&&(d=1,Z.value="100 %");var d=.75*d,f=q.value,k=t.value,g=!n.checked,m=null;g&&(g=f==l&&k==l);if(!g&&null!=a.pages&&a.pages.length){var p=0,g=a.pages.length-1;n.checked||(p=parseInt(f)-1,g=parseInt(k)-1);for(var v=p;v<=g;v++){var u=a.pages[v],f=u==a.currentPage?e:null;if(null==f){var f=a.createTemporaryGraph(e.getStylesheet()),
+k=!0,p=!1,x=null,z=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(k=u.viewState.pageVisible,p=u.viewState.mathEnabled,x=u.viewState.background,z=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(p="0"!=u.mapping.diagramMap.get("mathEnabled"),x=u.mapping.diagramMap.get("background"),z=u.mapping.diagramMap.get("backgroundImage"),z=null!=z&&0<z.length?JSON.parse(z):null);f.background=x;f.backgroundImage=null!=z?new mxImage(z.src,
+z.width,z.height):null;f.pageVisible=k;f.mathEnabled=p;var y=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?v+1:y.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(u);f.model.setRoot(u.root)}m=c(f,m,v!=g);f!=e&&f.container.parentNode.removeChild(f.container)}}else m=c(e);m.mathEnabled&&(g=m.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),
+g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),b&&(g.writeln("MathJax.Hub.Queue(function () {"),
+g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&b&&PrintDialog.printPreview(m)}var e=a.editor.graph,f=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,b||mxResources.get("print"));f.appendChild(k);var g=1,l=1,m=document.createElement("div");
+m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","all");n.setAttribute("type","radio");n.setAttribute("name","pages-printdialog");m.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));m.appendChild(k);mxUtils.br(m);var p=n.cloneNode(!0);n.setAttribute("checked","checked");p.setAttribute("value","range");
+m.appendChild(p);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");m.appendChild(k);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";m.appendChild(q);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));m.appendChild(k);var t=q.cloneNode(!0);m.appendChild(t);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(t,
+"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",c);mxEvent.addListener(t,"change",c);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){l=k+1;q.value=l;t.value=l;break}q.setAttribute("max",g);t.setAttribute("max",g);1<g&&f.appendChild(m);var v=document.createElement("div");v.style.marginBottom="10px";var u=document.createElement("input");u.style.marginRight="8px";u.setAttribute("value","adjust");u.setAttribute("type",
+"radio");u.setAttribute("name","printZoom");v.appendChild(u);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));v.appendChild(k);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="50px";v.appendChild(M);mxEvent.addListener(M,"focus",function(){u.checked=!0});f.appendChild(v);var m=m.cloneNode(!1),Q=u.cloneNode(!0);Q.setAttribute("value","fit");u.setAttribute("checked","checked");k=document.createElement("div");
+k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(Q);m.appendChild(k);v=document.createElement("table");v.style.display="inline-block";var X=document.createElement("tbody"),N=document.createElement("tr"),G=N.cloneNode(!0),W=document.createElement("td"),O=W.cloneNode(!0),ca=W.cloneNode(!0),Y=W.cloneNode(!0),S=W.cloneNode(!0),P=W.cloneNode(!0);W.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(W,mxResources.get("fitTo"));var R=document.createElement("input");
+R.style.cssText="margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("min","1");R.setAttribute("type","number");R.style.width="40px";O.appendChild(R);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross"));ca.appendChild(k);mxUtils.write(Y,mxResources.get("fitToBy"));var V=R.cloneNode(!0);S.appendChild(V);mxEvent.addListener(R,"focus",function(){Q.checked=!0});mxEvent.addListener(V,"focus",function(){Q.checked=!0});k=document.createElement("span");mxUtils.write(k,
+mxResources.get("fitToSheetsDown"));P.appendChild(k);N.appendChild(W);N.appendChild(O);N.appendChild(ca);G.appendChild(Y);G.appendChild(S);G.appendChild(P);X.appendChild(N);X.appendChild(G);v.appendChild(X);m.appendChild(v);f.appendChild(m);m=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));m.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(k,
+"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));m.appendChild(k);var Z=document.createElement("input");Z.style.cssText="margin:0 8px 0 8px;";Z.setAttribute("value","100 %");Z.style.width="60px";m.appendChild(Z);f.appendChild(m);k=document.createElement("div");k.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&&k.appendChild(m);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",k.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),v.className="geBtn",k.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className=
+"geBtn gePrimaryBtn";k.appendChild(v);a.editor.cancelFirst||k.appendChild(m);f.appendChild(k);this.container=f}})();(function(){EditorUi.VERSION="6.6.5";EditorUi.compactUi="atlas"!=uiTheme;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.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;(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){}})();
@@ -7576,7 +7577,7 @@ b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new D
/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var k=this.getBaseFilename(),g=k+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(g,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,k),this.saveData(g,a,l,"text/html");
else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(D){this.handleError(D)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"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 p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?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 g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
+mxUtils.getXml(a))})))}else g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(A){this.handleError(A)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!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!=a)try{this.setCurrentFile(a);
a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("readOnly"))));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),
@@ -7589,18 +7590,18 @@ b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorU
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,f=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 f=b[d],k=f.data;if(null!=k){var k=this.convertDataUri(k),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,
f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor=
-"inherit");g.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";l.appendChild(m);var y=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=y?this.confirm(mxResources.get("allChangesLost"),
-null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=F&&null!=
-F.parentNode&&F.parentNode.removeChild(F),F=m.cloneNode(!1),F.setAttribute("src",Editor.spinImage),F.setAttribute("title",mxResources.get("saving")),F.style.cursor="default",F.style.marginRight="2px",F.style.marginTop="-2px",l.insertBefore(F,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=F&&null!=F.parentNode&&(F.parentNode.removeChild(F),g.style.paddingRight=18*l.childNodes.length+"px")})):null==y&&(y=m.cloneNode(!1),
-y.setAttribute("src",IMAGE_PATH+"/download.png"),y.setAttribute("title",mxResources.get("save")),l.insertBefore(y,l.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==y||a.isModified()||(g.style.paddingRight=18*l.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=
-A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?
-(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;c.y-=A.view.translate.y;C(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&
-(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",
-null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),
-null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border=
+"inherit");g.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";l.appendChild(m);var z=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),
+null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var y=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=F&&null!=
+F.parentNode&&F.parentNode.removeChild(F),F=m.cloneNode(!1),F.setAttribute("src",Editor.spinImage),F.setAttribute("title",mxResources.get("saving")),F.style.cursor="default",F.style.marginRight="2px",F.style.marginTop="-2px",l.insertBefore(F,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=F&&null!=F.parentNode&&(F.parentNode.removeChild(F),g.style.paddingRight=18*l.childNodes.length+"px")})):null==z&&(z=m.cloneNode(!1),
+z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),l.insertBefore(z,l.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(g.style.paddingRight=18*l.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=
+y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=y.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);A(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(y.isSelectionEmpty())y.getRubberband().isActive()?
+(y.getRubberband().execute(a),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=y.getSelectionCells(),c=y.view.getBounds(b),d=y.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=y.view.translate.x;c.y-=y.view.translate.y;C(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.shape&&
+(y.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!1),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&(k.style.border="3px solid transparent",
+null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.graphHandler.shape&&(y.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",y.autoScroll=!0,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!0),
+null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border=
"3px solid transparent";k.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,g,l,m,n,p,q,v){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,n),c)],c[0].vertex=!0,C(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,
-p.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var t=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));f(l,k);b=b.concat(l);z(a);this.spinner.stop();t=!0}catch(ea){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<
-m.length;g++){var l=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(l)),p=this.editor.graph.getBoundingBoxFromGeometry(n);C(n,new mxRectangle(0,0,p.width,p.height),a)}t=!0}catch(ea){null!=window.console&&console.log("error in drop handler:",ea)}}t||(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,
+p.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var t=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));f(l,k);b=b.concat(l);A(a);this.spinner.stop();t=!0}catch(da){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<
+m.length;g++){var l=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(l)),p=this.editor.graph.getBoundingBoxFromGeometry(n);C(n,new mxRectangle(0,0,p.width,p.height),a)}t=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}}t||(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,
p)&&null!=v?this.parseFile(v,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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();
a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var F=null;mxEvent.addListener(m,"click",E)}g.appendChild(l);g.style.paddingRight=18*l.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&
@@ -7618,7 +7619,7 @@ EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"
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,e){if(!mxClient.IS_EDGE&&window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(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 f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,
c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(t){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?
-"&base64="+f:"")+(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),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),x=Array(l-k),y=0;k<l;++y,++k)x[y]=c[k].charCodeAt(0);f[g]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f){f=null!=f?f:!1;e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,
+"&base64="+f:"")+(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),k=0;k<e;++k){for(var g=1024*k,l=Math.min(g+1024,d),x=Array(l-g),z=0;g<l;++z,++g)x[z]=c[g].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f){f=null!=f?f:!1;e=!mxClient.IS_IOS||!navigator.standalone;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)f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=
window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,e,null,null,f?3:4);this.showDialog(b.container,380,this.getServiceCount(f)-1<(f?4:5)?270:390,!0,!0);
b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||
@@ -7626,37 +7627,37 @@ b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()
function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,u,v){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;k=b?null:this.editor.graph.background;
k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,u,null,c);d&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v));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(m,"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,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");
-c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.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>'}
+c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.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="4px";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",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=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 f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,u){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=
+"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",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF?
+"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);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,e,f,g,u){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=
b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.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&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),u||null==k||k.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="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,u,v,x,y){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=
+null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,u,v,x,z){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=
e);"auto"!==d&&(l.target=d);v||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);u&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),l.toolbar=c.join(" "));x&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+
-(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+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 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 l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.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")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
-":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),g,!g),E=this.addCheckbox(e,mxResources.get("layers"),!0),F=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),
-!0);D.style.marginLeft="24px";D.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,A.checked,B.value,n.getTarget(),n.getColor(),z.checked,C.checked,E.checked,F.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");
-g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="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(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.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!=c||null!=d)a+=30,mxUtils.write(g,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%",g.appendChild(p),mxUtils.write(g,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",g.appendChild(q),mxUtils.br(g);var z=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var C=null;
-if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(g,mxResources.get("lightbox"),!0),F=this.addCheckbox(g,mxResources.get("showEditButton"),!0);F.style.marginLeft="24px";var D=this.addCheckbox(g,mxResources.get("layers"),!0);D.style.marginLeft=F.style.marginLeft;D.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?(D.removeAttribute("disabled"),F.removeAttribute("disabled")):(D.setAttribute("disabled",
-"disabled"),F.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==C?!0:C.checked,E.checked,F.checked,D.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):z.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 g=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,
-function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.whiteSpace="nowrap";var l=this.editor.graph,m=280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";k.appendChild(n);mxUtils.write(k,mxResources.get("zoom")+":");var p=document.createElement("input");
+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+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 k=document.createElement("div");k.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");k.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(l);mxUtils.br(k);k.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));k.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.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")),k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(k);var n=this.addLinkSection(e),y=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var A=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),k,!k),E=this.addCheckbox(e,mxResources.get("layers"),!0),F=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),
+!0);D.style.marginLeft="24px";D.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,y.checked,B.value,n.getTarget(),n.getColor(),A.checked,C.checked,E.checked,F.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var k=document.createElement("div");
+k.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(g);var l=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var g="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(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);k.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!=c||null!=d)a+=30,mxUtils.write(k,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%",k.appendChild(p),mxUtils.write(k,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",k.appendChild(q),mxUtils.br(k);var A=this.addLinkSection(k,f);c=null!=this.pages&&1<this.pages.length;var C=null;
+if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(k,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(k,mxResources.get("lightbox"),!0),F=this.addCheckbox(k,mxResources.get("showEditButton"),!0);F.style.marginLeft="24px";var D=this.addCheckbox(k,mxResources.get("layers"),!0);D.style.marginLeft=F.style.marginLeft;D.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?(D.removeAttribute("disabled"),F.removeAttribute("disabled")):(D.setAttribute("disabled",
+"disabled"),F.setAttribute("disabled","disabled"))});b=new CustomDialog(this,k,mxUtils.bind(this,function(){e(A.getTarget(),A.getColor(),null==C?!0:C.checked,E.checked,F.checked,D.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):A.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 k=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(!k.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,e,f,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.whiteSpace="nowrap";var l=this.editor.graph,m=280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";k.appendChild(n);mxUtils.write(k,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="100%";k.appendChild(p);mxUtils.write(k,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="0";k.appendChild(q);mxUtils.br(k);var t=this.addCheckbox(k,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==
l.background),C=this.addCheckbox(k,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");f&&(k.appendChild(E),mxUtils.write(k,mxResources.get("crop")),mxUtils.br(k),m+=26);l.isSelectionEmpty()?E.setAttribute("disabled","disabled"):(E.setAttribute("checked","checked"),E.defaultChecked=!0);var F=this.addCheckbox(k,mxResources.get("shadow"),l.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&&(k.appendChild(D),mxUtils.write(k,mxResources.get("embedImages")),mxUtils.br(k),m+=26);var K=this.addCheckbox(k,mxResources.get("includeCopyOfMyDiagram"),g),H=null!=this.pages&&1<this.pages.length,J=J=this.addCheckbox(k,H?mxResources.get("allPages"):"",H,!H);J.style.marginLeft="24px";J.style.marginBottom="16px";H||(J.style.visibility=
"hidden");mxEvent.addListener(K,"change",function(){K.checked&&H?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});g&&H||J.setAttribute("disabled","disabled");a=new CustomDialog(this,k,mxUtils.bind(this,function(){e(p.value,t.checked,!C.checked,F.checked,K.checked,D.checked,q.value,E.checked,!J.checked)}),null,c,d);this.showDialog(a.container,320,m,!0,!0);p.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};
EditorUi.prototype.showExportJpgDialog=function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";
-f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);
+f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value="0";c.appendChild(k);mxUtils.br(c);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);
mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var x=this.addCheckbox(c,mxResources.get("shadow"),d.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");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,
-!k.checked,x.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var z=1<g.model.getChildCount(g.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),z,!z);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?
-(z&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,u){function k(b){var k=" ",m="";d&&(k=" 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.checked,x.checked,k.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var k=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";
+f.appendChild(g)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var A=1<k.model.getChildCount(k.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),A,!A);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?
+(A&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,u){function k(b){var k=" ",m="";d&&(k=" 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"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=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");k(a)}),null,null,null,mxUtils.bind(this,function(a){u({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):u({message:mxResources.get("unknownError")})}))}else u({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="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"+
@@ -7664,103 +7665,103 @@ EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.grap
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(k.getAttribute("width")),b=parseInt(k.getAttribute("height")),k.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",k.removeAttribute("height")),""!=q&&k.setAttribute("style",q),g(mxUtils.getXml(k))};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.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=b.background;g==mxConstants.NONE&&(g=null);b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=
c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((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,e,f,g,
-u,v){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,u):null,v)}catch(A){"Invalid image"==A.message?this.downloadFile(v):this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
-this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(y){this.spinner.stop(),this.handleError(y)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,u,v,x,y,A,B,z){f=null!=f?f:!0;A=null!=A?A:this.editor.graph;B=null!=B?B:0;var k=v?null:A.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==v&&(k="#ffffff");this.convertImages(A.getSvg(k,null,null,z,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),
-g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));u=null!=u?u:1;null!=b&&(u=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(u*g)+2*B;l=Math.ceil(u*l)+2*B;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(u,u);m.drawImage(d,B/u,B/u);a(e)});d.onerror=function(a){null!=e&&e(a)};try{x&&this.editor.graph.addSvgShadow(c),this.convertMath(A,c,!0,mxUtils.bind(this,function(){d.src=
-this.createSvgDataUri(mxUtils.getXml(c))}))}catch(D){null!=e&&e(D)}}),c,y)};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,
+u,v){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,u):null,v)}catch(y){"Invalid image"==y.message?this.downloadFile(v):this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,u,v,x,z,y,B,A){f=null!=f?f:!0;y=null!=y?y:this.editor.graph;B=null!=B?B:0;var k=v?null:y.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==v&&(k="#ffffff");this.convertImages(y.getSvg(k,null,null,A,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),
+g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));u=null!=u?u:1;null!=b&&(u=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(u*g)+2*B;l=Math.ceil(u*l)+2*B;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(u,u);m.drawImage(d,B/u,B/u);a(e)});d.onerror=function(a){null!=e&&e(a)};try{x&&this.editor.graph.addSvgShadow(c),this.convertMath(y,c,!0,mxUtils.bind(this,function(){d.src=
+this.createSvgDataUri(mxUtils.getXml(c))}))}catch(D){null!=e&&e(D)}}),c,z)};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 k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};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,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),l=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var m=l.getElementsByTagName("diagram");if(1==m.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){g.model.beginUpdate();try{for(var n=0;n<m.length;n++){var p=this.updatePageRoot(new DiagramPage(m[n])),
-B=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[B+1]));g.model.execute(new ChangePage(this,p,p,B))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var z=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,z);var C=z.getChildCount(z.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<C;n++){var E=z.getChildAt(z.getRoot(),n);if(1!=C||g.isCellLocked(g.getDefaultParent()))E=g.importCells([E],0,0,g.model.getRoot(),
-null,a)[0],F=g.model.getChildren(E),g.moveCells(F,b,c),f=f.concat(F);else var F=z.getChildren(E),f=f.concat(g.importCells(F,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(K){throw e||this.handleError(K,mxResources.get("invalidOrMissingFile")),K;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
+B=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[B+1]));g.model.execute(new ChangePage(this,p,p,B))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var A=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,A);var C=A.getChildCount(A.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<C;n++){var E=A.getChildAt(A.getRoot(),n);if(1!=C||g.isCellLocked(g.getDefaultParent()))E=g.importCells([E],0,0,g.model.getRoot(),
+null,a)[0],F=g.model.getChildren(E),g.moveCells(F,b,c),f=f.concat(F);else var F=A.getChildren(E),f=f.concat(g.importCells(F,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(K){throw e||this.handleError(K,mxResources.get("invalidOrMissingFile")),K;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
b,c,d)}catch(q){}});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.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!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()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,
-26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(y){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(z){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),
null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var k=null,m;for(m in e.Pages)if(l=e.Pages[m],null!=l&&"0"==l.Properties.Order){k=l;break}null!=
k&&this.insertLucidChart(k,b,c,f)}else{g=this.editor.graph;f=null;g.getModel().beginUpdate();try{f=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=a,g.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)&&
g.setLinkForCell(f,f.value),f.geometry.width+=g.gridSize,f.geometry.height+=g.gridSize}finally{g.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,e,f,g,u,v,x,y){x=null!=x?x:!0;var k=!1,l=null;"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=y?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,x),v=!0)),v||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,
+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,e,f,g,u,v,x,z){x=null!=x?x:!0;var k=!1,l=null;"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,x),v=!0)),v||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,
b)+a.substring(a.indexOf(",",b+1))),x&&l.isGridEnabled()&&(c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(k=!0,this.parseFile(null!=v?v: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!=g&&".vssx"==g.toLowerCase().substring(g.length-5)&&(g=g.substring(0,g.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,g))):b=this.importXml(a,c,d,x));null!=u&&u(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x));k||null==u||u(l);return l};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,e,f,g,u,v,x,y,A){var k=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;v=null!=v?v:!0;var l=this.editor.graph,
-m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,l,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,l,m,k,A)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],t=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=u)u(q);else{var c=[];l.getModel().beginUpdate();
-try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),H=0;H<n;H++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],u=A?null:p.getAttribute("content");null!=u&&
+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,e,f,g,u,v,x,z,y){var k=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;v=null!=v?v:!0;var l=this.editor.graph,
+m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,l,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,l,m,k,y)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],t=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=u)u(q);else{var c=[];l.getModel().beginUpdate();
+try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),H=0;H<n;H++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],u=y?null:p.getAttribute("content");null!=u&&
"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?t(f,mxUtils.bind(this,function(){try{if(l.substring(0,n+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var g=a[0],p=parseFloat(g.getAttribute("width")),v=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox",
-"0 0 "+p+" "+v);else if(isNaN(p)||isNaN(v)){var x=t.split(" ");3<x.length&&(p=parseFloat(x[2]),v=parseFloat(x[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var u=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,v));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*u)),Math.max(1,Math.round(v*u)),k.name)}}}catch(T){}return null})):t(f,mxUtils.bind(this,function(){return e(u,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var z=A?null:this.extractGraphModelFromPng(a.target.result);
-if(null!=z&&0<z.length){var B=new Image;B.src=a.target.result;t(f,mxUtils.bind(this,function(){return e(z,"text/xml",b+f*m,c+f*m,B.width,B.height,k.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(g){this.resizeImage(g,
-a.target.result,mxUtils.bind(this,function(g,l,n){t(f,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var p=v&&this.isResampleImage(a.target.result)?Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,d,y)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){t(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)?
+"0 0 "+p+" "+v);else if(isNaN(p)||isNaN(v)){var u=t.split(" ");3<u.length&&(p=parseFloat(u[2]),v=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,v));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*x)),Math.max(1,Math.round(v*x)),k.name)}}}catch(T){}return null})):t(f,mxUtils.bind(this,function(){return e(u,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var A=y?null:this.extractGraphModelFromPng(a.target.result);
+if(null!=A&&0<A.length){var B=new Image;B.src=a.target.result;t(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*m,c+f*m,B.width,B.height,k.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(g){this.resizeImage(g,
+a.target.result,mxUtils.bind(this,function(g,l,n){t(f,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var p=v&&this.isResampleImage(a.target.result)?Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,d,z)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){t(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)?
e(null,k.type,b+f*m,c+f*m,240,160,k.name,function(a){t(f,function(){return a})},k):"image"==k.type.substring(0,5)?l.readAsDataURL(k):l.readAsText(k)})(H)};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,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),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 z=document.createElement("canvas");z.width=m;z.height=n;var C=z.toDataURL();q!==C&&(b=q,g=m,k=n)}}}catch(E){}c(b,g,k)};EditorUi.prototype.crcTable=[];
+function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),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 A=document.createElement("canvas");A.width=m;A.height=n;var C=A.toDataURL();q!==C&&(b=q,g=m,k=n)}}}catch(E){}c(b,g,k)};EditorUi.prototype.crcTable=[];
for(var c=0;256>c;c++)for(var f=c,d=0;8>d;d++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[c]=f;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,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(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(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var m=g(a);if("IDAT"==f(a,4)){e=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);e+=k(c.length)+b+c+k(d^4294967295);
e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+m);d=f(a,m);f(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);
-var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.graph.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:d.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=
-b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.isEnabled();if(!this.editor.chromeless){var f=function(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.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||a.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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(K){}}),!1);var g=document.createElement("div");g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.contentEditable=!0;mxUtils.setOpacity(g,
-0);g.style.width="1px";g.style.height="1px";g.innerHTML="&nbsp;";var t=!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 c=mxEvent.getSource(b);null==a.container||!a.isEnabled()||a.isMouseDown||a.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||
-t||(g.style.left=a.container.scrollLeft+10+"px",g.style.top=a.container.scrollTop+10+"px",a.container.appendChild(g),t=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){g.focus();document.execCommand("selectAll",!1,null)},0):(g.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=c&&17!=c&&91!=c||(t=!1,a.isEditing()||null!=this.dialog||null==a.container||a.container.focus(),
-g.parentNode.removeChild(g))}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(g),f())}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(g,!0),f())}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,g);g.innerHTML="&nbsp;"}),0))}),
-!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==g?!0:u.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.test){e=document.getElementById("geFooter");null!=e&&(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)})),e.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 v=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:v.apply(this,arguments)}}e=document.getElementById("geInfo");null!=e&&e.parentNode.removeChild(e);if(Graph.fileSupport){var x=
-null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=x&&(x.parentNode.removeChild(x),x=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){null==x&&(!mxClient.IS_IE||10<document.documentMode)&&(x=this.highlightElement(a.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=x&&(x.parentNode.removeChild(x),
-x=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.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 k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=
-k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=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,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,
-f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};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.insertLucidChart(JSON.parse(d)),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(v){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(v){}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(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){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(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);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){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=
-0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?
-this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,
-d)});b.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)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};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()?(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"))}))):e())};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)};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.showLayersDialog()):(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(J){}return a}var l=f.data;if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(H){l=null}if(null==l)return;
-if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var m=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?
-mxResources.get(l.titleKey):l.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==l.action){m=null;m="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):k(l.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(H){g.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=
-l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,
-t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data=a;g.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=
-this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),F=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:F.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(D.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,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
-("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=
-this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),
-"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),
-this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
-"12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}l=k(l);c=!0;try{a(l,f)}catch(H){this.handleError(H)}c=!1;null!=
-urlParams.modified&&this.editor.setStatus("");var K=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=K();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=K();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),
-"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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")+" (Ctrl+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,f=null,g="auto",k="auto",v=40,x=40,y=0,A=this.editor.graph;A.getGraphBounds();for(var B=function(){A.setSelectionCells(S);A.scrollCellToVisible(A.getSelectionCell())},z=A.getFreeInsertPoint(),C=z.x,E=z.y,z=E,F=null,D="auto",K=[],H=null,J=null,I=0;I<b.length&&"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var L=a.indexOf(":");
-if(0<L){var M=mxUtils.trim(a.substring(1,L)),Q=mxUtils.trim(a.substring(L+1));"label"==M?F=A.sanitizeHtml(Q):"style"==M?e=Q:"identity"==M&&0<Q.length&&"-"!=Q?f=Q:"width"==M?g=Q:"height"==M?k=Q:"ignore"==M?J=Q.split(","):"connect"==M?K.push(JSON.parse(Q)):"link"==M?H=Q:"padding"==M?y=parseFloat(Q):"edgespacing"==M?v=parseFloat(Q):"nodespacing"==M?x=parseFloat(Q):"layout"==M&&(D=Q)}}}var W=this.editor.csvToArray(b[I]);a=null;if(null!=f)for(var O=0;O<W.length;O++)if(f==W[O]){a=O;break}null==F&&(F="%"+
-W[0]+"%");if(null!=K)for(var G=0;G<K.length;G++)null==d[K[G].to]&&(d[K[G].to]={});A.model.beginUpdate();try{for(O=I+1;O<b.length;O++){var X=this.editor.csvToArray(b[O]);if(X.length==W.length){var N=null,da=null!=a?X[a]:null;null!=da&&(N=A.model.getCell(da));null==N&&(N=new mxCell(F,new mxGeometry(C,z,0,0),e||"whiteSpace=wrap;html=1;"),N.vertex=!0,N.id=da);for(var Y=0;Y<X.length;Y++)A.setAttributeForCell(N,W[Y],X[Y]);A.setAttributeForCell(N,"placeholders","1");N.style=A.replacePlaceholders(N,N.style);
-for(G=0;G<K.length;G++)d[K[G].to][N.getAttribute(K[G].to)]=N;null!=H&&"link"!=H&&(A.setLinkForCell(N,N.getAttribute(H)),A.setAttributeForCell(N,H,null));var R=this.editor.graph.getPreferredSizeForCell(N);N.geometry.width="auto"==g?R.width+y:parseFloat(g);N.geometry.height="auto"==k?R.height+y:parseFloat(k);z+=N.geometry.height+x;c.push(A.addCell(N))}}null==e&&A.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var P=c.slice(),S=c.slice(),G=0;G<K.length;G++)for(var V=K[G],O=0;O<c.length;O++){var N=
-c[O],ea=N.getAttribute(V.from);if(null!=ea){A.setAttributeForCell(N,V.from,null);for(var ba=ea.split(","),Y=0;Y<ba.length;Y++){var T=d[V.to][ba[Y]];null!=T&&(S.push(A.insertEdge(null,null,V.label||"",V.invert?T:N,V.invert?N:T,V.style||A.createCurrentEdgeStyle())),mxUtils.remove(V.invert?N:T,P))}}}if(null!=J)for(O=0;O<c.length;O++)for(N=c[O],Y=0;Y<J.length;Y++)A.setAttributeForCell(N,mxUtils.trim(J[Y]),null);var aa=new mxParallelEdgeLayout(A);aa.spacing=v;var ca=function(){aa.execute(A.getDefaultParent());
-for(var a=0;a<c.length;a++){var b=A.getCellGeometry(c[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==g&&(b.width=Math.round(A.snap(b.width)));"auto"==k&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==D){var U=new mxCircleLayout(A);U.resetEdges=!1;var Z=U.isVertexIgnored;U.isVertexIgnored=function(a){return Z.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){U.execute(A.getDefaultParent());ca()},!0,B);B=null}else if("horizontaltree"==D||"verticaltree"==
-D||"auto"==D&&S.length==2*c.length-1&&1==P.length){A.view.validate();var ha=new mxCompactTreeLayout(A,"horizontaltree"==D);ha.levelDistance=x;ha.edgeRouting=!1;this.executeLayout(function(){ha.execute(A.getDefaultParent(),0<P.length?P[0]:null)},!0,B);B=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==P.length){A.view.validate();var fa=new mxHierarchicalLayout(A,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fa.intraCellSpacing=x;this.executeLayout(function(){fa.execute(A.getDefaultParent(),
-S);A.moveCells(S,C,E)},!0,B);B=null}else if("organic"==D||"auto"==D&&S.length>c.length){A.view.validate();var ka=new mxFastOrganicLayout(A);ka.forceConstant=3*x;ka.resetEdges=!1;var ja=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(A);aa.spacing=v;this.executeLayout(function(){ka.execute(A.getDefaultParent());ca()},!0,B);B=null}this.hideDialog()}finally{A.model.endUpdate()}null!=B&&B()}}catch(la){this.handleError(la)}};
-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(" "),
+var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.graph.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,
+c.currentPage)+1:1:d.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.isEnabled();if(!this.editor.chromeless){var f=function(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.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||a.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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(K){}}),!1);var g=document.createElement("div");
+g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.contentEditable=!0;mxUtils.setOpacity(g,0);g.style.width="1px";g.style.height="1px";g.innerHTML="&nbsp;";var t=!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 c=mxEvent.getSource(b);null==a.container||!a.isEnabled()||a.isMouseDown||a.isEditing()||
+null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||t||(g.style.left=a.container.scrollLeft+10+"px",g.style.top=a.container.scrollTop+10+"px",a.container.appendChild(g),t=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){g.focus();document.execCommand("selectAll",!1,null)},0):(g.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=
+b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=c&&17!=c&&91!=c||(t=!1,a.isEditing()||null!=this.dialog||null==a.container||a.container.focus(),g.parentNode.removeChild(g))}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(g),f())}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(g,!0),f())}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&
+(g.innerHTML="&nbsp;",g.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,g);g.innerHTML="&nbsp;"}),0))}),!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==g?!0:u.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.test){e=document.getElementById("geFooter");
+null!=e&&(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)})),e.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 v=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:v.apply(this,arguments)}}e=document.getElementById("geInfo");
+null!=e&&e.parentNode.removeChild(e);if(Graph.fileSupport){var x=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=x&&(x.parentNode.removeChild(x),x=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){null==x&&(!mxClient.IS_IE||10<document.documentMode)&&(x=this.highlightElement(a.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=x&&(x.parentNode.removeChild(x),x=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.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 k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=
+e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=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,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};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.insertLucidChart(JSON.parse(d)),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(v){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(v){}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(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){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(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);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){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+
+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else"image/png"==
+a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,d)});b.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)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};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()?(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"))}))):e())};
+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)};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.showLayersDialog()):
+(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(J){}return a}var l=f.data;
+if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(H){l=null}if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var m=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=
+a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==l.action){m=null;m="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):k(l.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(H){g.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();
+m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):
+null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?
+l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data=a;g.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);
+t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),F=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:F.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(D.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,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=
+this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,
+null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),
+"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),
+mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),
+"*");return}}l=k(l);c=!0;try{a(l,f)}catch(H){this.handleError(H)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var K=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=K();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=K();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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")+" (Ctrl+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,f=null,g="auto",k="auto",v=40,x=40,z=0,y=this.editor.graph;y.getGraphBounds();for(var B=function(){y.setSelectionCells(R);y.scrollCellToVisible(y.getSelectionCell())},A=y.getFreeInsertPoint(),C=A.x,E=A.y,A=E,F=null,D="auto",K=[],H=null,J=null,I=0;I<b.length&&"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var L=a.indexOf(":");if(0<L){var M=mxUtils.trim(a.substring(1,L)),Q=mxUtils.trim(a.substring(L+1));"label"==M?F=y.sanitizeHtml(Q):"style"==M?e=Q:"identity"==M&&0<Q.length&&"-"!=Q?f=Q:"width"==M?g=Q:"height"==M?k=Q:"ignore"==M?J=Q.split(","):"connect"==M?K.push(JSON.parse(Q)):"link"==M?H=Q:"padding"==M?z=parseFloat(Q):"edgespacing"==M?v=parseFloat(Q):"nodespacing"==M?x=parseFloat(Q):"layout"==M&&(D=Q)}}}var X=this.editor.csvToArray(b[I]);
+a=null;if(null!=f)for(var N=0;N<X.length;N++)if(f==X[N]){a=N;break}null==F&&(F="%"+X[0]+"%");if(null!=K)for(var G=0;G<K.length;G++)null==d[K[G].to]&&(d[K[G].to]={});y.model.beginUpdate();try{for(N=I+1;N<b.length;N++){var W=this.editor.csvToArray(b[N]);if(W.length==X.length){var O=null,ca=null!=a?W[a]:null;null!=ca&&(O=y.model.getCell(ca));null==O&&(O=new mxCell(F,new mxGeometry(C,A,0,0),e||"whiteSpace=wrap;html=1;"),O.vertex=!0,O.id=ca);for(var Y=0;Y<W.length;Y++)y.setAttributeForCell(O,X[Y],W[Y]);
+y.setAttributeForCell(O,"placeholders","1");O.style=y.replacePlaceholders(O,O.style);for(G=0;G<K.length;G++)d[K[G].to][O.getAttribute(K[G].to)]=O;null!=H&&"link"!=H&&(y.setLinkForCell(O,O.getAttribute(H)),y.setAttributeForCell(O,H,null));var S=this.editor.graph.getPreferredSizeForCell(O);O.geometry.width="auto"==g?S.width+z:parseFloat(g);O.geometry.height="auto"==k?S.height+z:parseFloat(k);A+=O.geometry.height+x;c.push(y.addCell(O))}}null==e&&y.fireEvent(new mxEventObject("cellsInserted","cells",
+c));for(var P=c.slice(),R=c.slice(),G=0;G<K.length;G++)for(var V=K[G],N=0;N<c.length;N++){var O=c[N],da=O.getAttribute(V.from);if(null!=da){y.setAttributeForCell(O,V.from,null);for(var Z=da.split(","),Y=0;Y<Z.length;Y++){var T=d[V.to][Z[Y]];null!=T&&(R.push(y.insertEdge(null,null,V.label||"",V.invert?T:O,V.invert?O:T,V.style||y.createCurrentEdgeStyle())),mxUtils.remove(V.invert?O:T,P))}}}if(null!=J)for(N=0;N<c.length;N++)for(O=c[N],Y=0;Y<J.length;Y++)y.setAttributeForCell(O,mxUtils.trim(J[Y]),null);
+var ba=new mxParallelEdgeLayout(y);ba.spacing=v;var ea=function(){ba.execute(y.getDefaultParent());for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==g&&(b.width=Math.round(y.snap(b.width)));"auto"==k&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==D){var U=new mxCircleLayout(y);U.resetEdges=!1;var aa=U.isVertexIgnored;U.isVertexIgnored=function(a){return aa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){U.execute(y.getDefaultParent());
+ea()},!0,B);B=null}else if("horizontaltree"==D||"verticaltree"==D||"auto"==D&&R.length==2*c.length-1&&1==P.length){y.view.validate();var ha=new mxCompactTreeLayout(y,"horizontaltree"==D);ha.levelDistance=x;ha.edgeRouting=!1;this.executeLayout(function(){ha.execute(y.getDefaultParent(),0<P.length?P[0]:null)},!0,B);B=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==P.length){y.view.validate();var fa=new mxHierarchicalLayout(y,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
+fa.intraCellSpacing=x;this.executeLayout(function(){fa.execute(y.getDefaultParent(),R);y.moveCells(R,C,E)},!0,B);B=null}else if("organic"==D||"auto"==D&&R.length>c.length){y.view.validate();var ka=new mxFastOrganicLayout(y);ka.forceConstant=3*x;ka.resetEdges=!1;var ja=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ba=new mxParallelEdgeLayout(y);ba.spacing=v;this.executeLayout(function(){ka.execute(y.getDefaultParent());ea()},!0,B);B=null}this.hideDialog()}finally{y.model.endUpdate()}null!=
+B&&B()}}catch(la){this.handleError(la)}};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};var e=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=e.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*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return f.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*
@@ -7769,14 +7770,14 @@ null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.back
("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 c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.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);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 d=applicationCache;if(null!=d&&null==this.offlineStatus){var e=function(a){switch(a){case d.UNCACHED:return"";case d.IDLE:return'<img title="Cached" border="0" src="'+
-IMAGE_PATH+'/checkmark.gif"/>';case d.CHECKING:return'<img title="Checking..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.DOWNLOADING:return'<img title="Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.UPDATEREADY:return'<img title="Update ready" border="0" src="'+IMAGE_PATH+'/download.png"/>';case d.OBSOLETE:return'<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';default:return'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}};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);d=window.applicationCache;
-b=mxUtils.bind(this,function(){this.offlineStatus.innerHTML=e(d.status)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").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&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);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.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==
-c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*e/g.view.scale),n=Math.floor(l.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],recentColors:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:Graph.prototype.defaultVertexStyle,createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:13,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=
+IMAGE_PATH+'/checkmark.gif"/>';case d.CHECKING:return'<img title="Checking/Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.DOWNLOADING:return'<img title="Checking/Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.UPDATEREADY:return'<img title="Update ready" border="0" src="'+IMAGE_PATH+'/download.png"/>';case d.OBSOLETE:return'<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';default:return'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}};
+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"))}));d=window.applicationCache;b=mxUtils.bind(this,function(){var a=e(d.status);this.offlineStatus.innerHTML!=a&&(this.offlineStatus.innerHTML=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",
+b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=
+b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").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&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);
+this.actions.get("createRevision").setEnabled(c);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.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*e/g.view.scale),
+n=Math.floor(l.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],recentColors:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:Graph.prototype.defaultVertexStyle,createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:13,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=
a},getUi:function(){return this.settings.ui},setUi:function(a){this.settings.ui=a},getShowStartScreen:function(){return this.settings.showStartScreen},setShowStartScreen:function(a){this.settings.showStartScreen=a},getGridColor:function(){return this.settings.gridColor},setGridColor:function(a){this.settings.gridColor=a},getAutosave:function(){return this.settings.autosave},setAutosave:function(a){this.settings.autosave=a},getLibraries:function(){return this.settings.libraries},setLibraries:function(a){this.settings.libraries=
a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(this.settings.customLibraries,a)&&this.settings.customLibraries.push(a);mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,this.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return this.settings.customLibraries},getPlugins:function(){return this.settings.plugins},setPlugins:function(a){this.settings.plugins=a},getRecentColors:function(){return this.settings.recentColors},
setRecentColors:function(a){this.settings.recentColors=a},getFormatWidth:function(){return parseInt(this.settings.formatWidth)},setFormatWidth:function(a){this.settings.formatWidth=a},getCurrentEdgeStyle:function(){return this.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){this.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return this.settings.currentVertexStyle},setCurrentVertexStyle:function(a){this.settings.currentVertexStyle=a},isCreateTarget:function(){return this.settings.createTarget},
@@ -8243,21 +8244,21 @@ mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.
null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.addLinkToItem=function(a,b){if(null!=a){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;";
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(a){this.editorUi.menubar.hideMenu();window.open(b);mxEvent.consume(a)}));a.firstChild.nextSibling.appendChild(c)}};var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,b=a.editor.graph,e=mxUtils.bind(b,b.isEnabled),f=("1"!=urlParams.embed&&
"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),k=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),l=("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);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.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};a.actions.addAction("exportPdf",function(){a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!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(){b.getSelectionCells();if(1==b.getSelectionCount()){var c=b.getSelectionCell(),d=b.view.getState(c);null!=
-d&&null!=d.shape&&null!=d.shape.stencil&&(c=new EditShapeDialog(a,c,mxResources.get("editShape")+":",630,400),a.showDialog(c.container,640,480,!0,!1),c.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,
-mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);
-var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(C){a.handleError(C)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),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,"Ctrl+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 m=a.actions.addAction("mathematicalTypesetting",function(){a.setMathEnabled(!a.isMathEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return a.isMathEnabled()});m.isEnabled=e}isLocalStorage&&
-(m=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),m.setToggleAction(!0),m.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 c=b.getSelectionCells(),
-d=[],e=0;e<c.length;e++)b.getModel().isVertex(c[e])&&d.push(c[e]);0<d.length&&(c=new EditGeometryDialog(a,d),a.showDialog(c.container,180,180,!0,!0),c.init())},null,null,"Ctrl+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 c=b.view.getState(b.getSelectionCell());if(b.isEnabled()&&null!=c){a.copiedStyle=mxUtils.clone(c.style);for(var c=b.getModel().getStyle(c.cell),c=null!=c?c.split(";"):[],d=0;d<c.length;d++){var e=c[d],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,"Ctrl+Shift+C");a.actions.addAction("pasteStyle",function(){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=a.copiedStyle){b.getModel().beginUpdate();
-try{for(var c=b.getSelectionCells(),d=0;d<c.length;d++)for(var e=b.view.getState(c[d]),f=0;f<p.length;f++){var g=p[f],k=a.copiedStyle[g];e.style[g]!=k&&b.setCellStyles(g,k,[c[d]])}}finally{b.getModel().endUpdate()}}},null,null,"Ctrl+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()}}));m=a.actions.put("shadowVisible",
-new Action(mxResources.get("shadow"),function(){b.setShadowVisible(!b.shadowVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return b.shadowVisible});a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){a.showDialog((new AboutDialog(a)).container,220,300,!0,!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://support.draw.io/display/DO/draw.io+Online+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=8OaMWa4R1SE&t=1")});m=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())}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));m=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"))}),
+"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=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.addAction("exportPdf",function(){a.showDialog((new PrintDialog(a,
+mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!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(){b.getSelectionCells();if(1==b.getSelectionCount()){var c=b.getSelectionCell(),d=b.view.getState(c);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(c=new EditShapeDialog(a,c,mxResources.get("editShape")+":",630,400),a.showDialog(c.container,
+640,480,!0,!1),c.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,
+limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(C){a.handleError(C)}}));
+c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),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,"Ctrl+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 m=a.actions.addAction("mathematicalTypesetting",function(){a.setMathEnabled(!a.isMathEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return a.isMathEnabled()});m.isEnabled=e}isLocalStorage&&(m=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),
+m.setToggleAction(!0),m.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 c=b.getSelectionCells(),d=[],e=0;e<c.length;e++)b.getModel().isVertex(c[e])&&d.push(c[e]);0<d.length&&(c=new EditGeometryDialog(a,d),a.showDialog(c.container,180,
+180,!0,!0),c.init())},null,null,"Ctrl+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 c=b.view.getState(b.getSelectionCell());
+if(b.isEnabled()&&null!=c){a.copiedStyle=mxUtils.clone(c.style);for(var c=b.getModel().getStyle(c.cell),c=null!=c?c.split(";"):[],d=0;d<c.length;d++){var e=c[d],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,"Ctrl+Shift+C");a.actions.addAction("pasteStyle",function(){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=a.copiedStyle){b.getModel().beginUpdate();try{for(var c=b.getSelectionCells(),d=0;d<c.length;d++)for(var e=
+b.view.getState(c[d]),f=0;f<p.length;f++){var g=p[f],k=a.copiedStyle[g];e.style[g]!=k&&b.setCellStyles(g,k,[c[d]])}}finally{b.getModel().endUpdate()}}},null,null,"Ctrl+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()}}));m=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){b.setShadowVisible(!b.shadowVisible)}));
+m.setToggleAction(!0);m.setSelectedCallback(function(){return b.shadowVisible});a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){a.showDialog((new AboutDialog(a)).container,220,300,!0,!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://support.draw.io/display/DO/draw.io+Online+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=8OaMWa4R1SE&t=1")});m=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())}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));m=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())}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));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 q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.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||
@@ -8305,30 +8306,29 @@ return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEna
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("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));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)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);
-this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var t="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),u=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)};a.actions.addAction("insertText",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");
-a.vertex=!0;b.startEditingAtCell(b.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=e;a.actions.addAction("insertRectangle",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;b.setSelectionCell(b.addCell(a));b.scrollCellToVisible(b.getSelectionCell())}},null,null,"Ctrl+K").isEnabled=e;a.actions.addAction("insertEllipse",function(){if(b.isEnabled()&&
-!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;b.setSelectionCell(b.addCell(a));b.scrollCellToVisible(b.getSelectionCell())}},null,null,"Ctrl+Shift+K").isEnabled=e;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):u(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(b,
-c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):f&&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):k&&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):l&&b.addItem(mxResources.get("oneDrive")+" ("+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)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},
-c);a.isOffline()||(b.addSeparator(c),b.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)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",
-new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):f&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):f&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&
-a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(C){a.handleError(C,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},
-mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers",
-"-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
-c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addSubmenu("insert",b,c);b.addSeparator(c);this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);
-"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed?(b.addSeparator(c),this.addMenuItem(b,"tags",c),b.addSeparator(c)):(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966"),this.addMenuItems(b,["-","offline"],c));a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["chromeApp"],
-c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();
-null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,
-["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&
-d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var f=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");
-c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}f.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;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,c,f){this.ui=a;this.page=c;this.previous=f}
+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(" "),u=
+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)};a.actions.addAction("insertText",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),
+"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");a.vertex=!0;b.startEditingAtCell(b.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=e;a.actions.addAction("insertRectangle",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;b.setSelectionCell(b.addCell(a));b.scrollCellToVisible(b.getSelectionCell())}},
+null,null,"Ctrl+K").isEnabled=e;a.actions.addAction("insertEllipse",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;b.setSelectionCell(b.addCell(a));b.scrollCellToVisible(b.getSelectionCell())}},null,null,"Ctrl+Shift+K").isEnabled=e;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):u(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(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):f&&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):k&&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):l&&b.addItem(mxResources.get("oneDrive")+" ("+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)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,
+function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.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)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);
+b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):f&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
+c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);
+isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},
+c):f&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",
+null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,
+function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(C){a.handleError(C,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},
+function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,
+(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,
+"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(b,
+["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed?(b.addSeparator(c),this.addMenuItem(b,"tags",c),b.addSeparator(c)):(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966"),this.addMenuItems(b,["-","offline"],c));a.isOffline()||
+navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],
+c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,
+["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",
+b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var f=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight=
+"0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}f.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;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,c,f){this.ui=a;this.page=c;this.previous=f}
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,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
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,c){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,c=this.ui.editor,f=c.graph,d=c.graph.compress(f.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=f.getViewState();a.root=f.model.root;f.view.clear(a.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;f.model.rootChanged(a.root);f.setViewState(a.viewState);
diff --git a/war/js/atlas-viewer.min.js b/war/js/atlas-viewer.min.js
index 3445ec2c..0d859fe2 100644
--- a/war/js/atlas-viewer.min.js
+++ b/war/js/atlas-viewer.min.js
@@ -43,19 +43,19 @@ 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 m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,n=/[#\/\?@]/g,p=/[\#\?]/g;f.parse=a;f.create=function(a,d,e,k,g,l,m){a=new f(b(a,n),b(d,n),"string"==typeof e?encodeURIComponent(e):null,0<k?k.toString():null,b(g,p),null,"string"==typeof m?encodeURIComponent(m):null);l&&("string"===typeof l?a.O(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,c)):a.ba(l));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,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(x,c)+'")':'url("about:blank")'}function c(a){return A[a]}function d(a,b){return a?f.ha.N(a,b):b}function p(a,b,c){if(!c)return null;var d=(""+a).match(v);return!d||d[1]&&!H.test(d[1])?null:c(a,b)}function z(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
-"")}var x=/[\n\f\r\"\'()*<>]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,H=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function F(f,k,g,l,m){f=z(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y<k.length;++y){var x=k[y].toLowerCase(),v=x.charCodeAt(0),A,H,I,G,E,N;if(32===v)x="";else if(34===v)x=16===r?g?a(p(d(l,e(k[y].substring(1,x.length-1))),f,g)):"":
-q&8&&!(r&r-1)?x:"";else if("inherit"!==x){if(E=n.cssLitGroup){var M;if(!(M=n.cssLitMap)){M={};for(var P=E.length;0<=--P;)for(var V=E[P],ga=V.length;0<=--ga;)M[V[ga]]=c;M=n.cssLitMap=M}E=M}else E=c;if(N=E,N[z(x)]!==c)if(35===v&&/^#(?:[0-9a-f]{3}){1,2}$/.test(x))x=q&2?x:"";else if(48<=v&&57>=v)x=q&1?x:"";else if(A=x.charCodeAt(1),H=x.charCodeAt(2),I=48<=A&&57>=A,G=48<=H&&57>=H,43===v&&(I||46===A&&G))x=q&1?(I?"":"0")+x.substring(1):"";else if(45===v&&(I||46===A&&G))x=q&4?(I?"-":"-0")+x.substring(1):
-q&1?"0":"";else if(46===v&&I)x=q&1?"0"+x:"";else if('url("'===x.substring(0,5))x=g&&q&16?a(p(d(l,k[y].substring(5,x.length-2)),f,g)):"";else if("("===x.charAt(x.length-1))a:{E=k;M=y;x=1;P=M+1;for(v=E.length;P<v&&x;)V=E[P++],x+=")"===V?-1:/^[^"']*\($/.test(V);if(!x)for(x=E[M].toLowerCase(),v=z(x),E=E.splice(M,P-M,""),M=n.cssFns,P=0,V=M.length;P<V;++P)if(M[P].substring(0,v.length)==v){E[0]=E[E.length-1]="";F(M[P],E,g,l);x=x+E.join(" ")+")";break a}x=""}else x=t&&/^-?[a-z_][\w\-]*$/.test(x)&&!/__$/.test(x)?
-m&&512===t?k[y]+m:1024===t&&b[x]&&"number"===typeof b[x].oa?x:"":/^\w+$/.test(x)&&64===r&&q&8?u+1===C?(k[u]=k[u].substring(0,k[u].length-1)+" "+x+'"',""):(u=C,'"'+x+'"'):""}x&&(k[C++]=x)}1===C&&'url("about:blank")'===k[0]&&(C=0);k.length=C}else k.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)$/,
+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,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(y,c)+'")':'url("about:blank")'}function c(a){return A[a]}function d(a,b){return a?f.ha.N(a,b):b}function p(a,b,c){if(!c)return null;var d=(""+a).match(v);return!d||d[1]&&!E.test(d[1])?null:c(a,b)}function z(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
+"")}var y=/[\n\f\r\"\'()*<>]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,E=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function F(f,k,g,l,m){f=z(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,x=0,D=0;x<k.length;++x){var v=k[x].toLowerCase(),y=v.charCodeAt(0),A,E,G,I,H,N;if(32===y)v="";else if(34===y)v=16===r?g?a(p(d(l,e(k[x].substring(1,v.length-1))),f,g)):"":
+q&8&&!(r&r-1)?v:"";else if("inherit"!==v){if(H=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var P=H.length;0<=--P;)for(var V=H[P],ga=V.length;0<=--ga;)L[V[ga]]=c;L=n.cssLitMap=L}H=L}else H=c;if(N=H,N[z(v)]!==c)if(35===y&&/^#(?:[0-9a-f]{3}){1,2}$/.test(v))v=q&2?v:"";else if(48<=y&&57>=y)v=q&1?v:"";else if(A=v.charCodeAt(1),E=v.charCodeAt(2),G=48<=A&&57>=A,I=48<=E&&57>=E,43===y&&(G||46===A&&I))v=q&1?(G?"":"0")+v.substring(1):"";else if(45===y&&(G||46===A&&I))v=q&4?(G?"-":"-0")+v.substring(1):
+q&1?"0":"";else if(46===y&&G)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[x].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;L=x;v=1;P=L+1;for(y=H.length;P<y&&v;)V=H[P++],v+=")"===V?-1:/^[^"']*\($/.test(V);if(!v)for(v=H[L].toLowerCase(),y=z(v),H=H.splice(L,P-L,""),L=n.cssFns,P=0,V=L.length;P<V;++P)if(L[P].substring(0,y.length)==y){H[0]=H[H.length-1]="";F(L[P],H,g,l);v=v+H.join(" ")+")";break a}v=""}else v=t&&/^-?[a-z_][\w\-]*$/.test(v)&&!/__$/.test(v)?
+m&&512===t?k[x]+m:1024===t&&b[v]&&"number"===typeof b[v].oa?v:"":/^\w+$/.test(v)&&64===r&&q&8?u+1===D?(k[u]=k[u].substring(0,k[u].length-1)+" "+v+'"',""):(u=D,'"'+v+'"'):""}v&&(k[D++]=v)}1===D&&'url("about:blank")'===k[0]&&(D=0);k.length=D}else k.length=0}}();var H=/^(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)$/,
G={};G[">"]=G["+"]=G["~"]=G;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c<d&&((r=a[c],"*"===r)?(++c,g=r):/^[a-zA-Z]/.test(r)&&(l=k(r.toLowerCase(),[]))&&("tagName"in l&&(r=l.tagName),++c,g=r));for(p=m=l="";t&&c<d;++c)if(r=a[c],"#"===r.charAt(0))/^#_|__$|[^\w#:\-]/.test(r)?t=!1:l+=r+f;else if("."===r)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(r=a[c])&&!/^_|__$/.test(r)?l+="."+r:t=!1;else if(c+1<d&&"["===a[c]){++c;var F=a[c++].toLowerCase();r=q.m[g+"::"+F];r!==+r&&(r=q.m["*::"+
-F]);var u;b.ia?(u=b.ia(g,F),"string"!==typeof u&&(t=!1,u=F),t&&r!==+r&&(r=q.d.NONE)):(u=F,r!==+r&&(t=!1));var y=F="",D=!1;/^[~^$*|]?=$/.test(a[c])&&(F=a[c++],y=a[c++],/^[0-9A-Za-z:_\-]+$/.test(y)?y='"'+y+'"':"]"===y&&(y='""',--c),/^"([^\"\\]|\\.)*"$/.test(y)||(t=!1),(D="i"===a[c])&&++c);"]"!==a[c]&&(++c,t=!1);switch(r){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==F&&"~="!==F&&"$="!==F||'""'==y||D?"|="===F||""===F||(t=!1):y='"'+y.substring(1,
-y.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==F&&(t=!1);break;default:t=!1}t&&(m+="["+u.replace(/[^\w-]/g,"\\$&")+F+y+(D?" i]":"]"))}else if(c<d&&":"===a[c])if(r=a[++c],E.test(r))p+=":"+r;else break;else break;c!==d&&(t=!1);t&&(c=(g+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+e)&&n.push(c);return t}" "===a[d]&&++d;l-1!==d&&" "===a[l]&&--l;for(var n=[],p=d,r=!0,t=d;r&&t<l;++t){var F=a[t];if(G[F]===G||" "===F)m(p,t,F)?p=t+1:r=!1}m(p,l,"")||(r=!1);return r?(n.length&&(p=n.join(""),null!==
+F]);var u;b.ia?(u=b.ia(g,F),"string"!==typeof u&&(t=!1,u=F),t&&r!==+r&&(r=q.d.NONE)):(u=F,r!==+r&&(t=!1));var x=F="",C=!1;/^[~^$*|]?=$/.test(a[c])&&(F=a[c++],x=a[c++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--c),/^"([^\"\\]|\\.)*"$/.test(x)||(t=!1),(C="i"===a[c])&&++c);"]"!==a[c]&&(++c,t=!1);switch(r){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==F&&"~="!==F&&"$="!==F||'""'==x||C?"|="===F||""===F||(t=!1):x='"'+x.substring(1,
+x.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==F&&(t=!1);break;default:t=!1}t&&(m+="["+u.replace(/[^\w-]/g,"\\$&")+F+x+(C?" i]":"]"))}else if(c<d&&":"===a[c])if(r=a[++c],H.test(r))p+=":"+r;else break;else break;c!==d&&(t=!1);t&&(c=(g+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+e)&&n.push(c);return t}" "===a[d]&&++d;l-1!==d&&" "===a[l]&&--l;for(var n=[],p=d,r=!0,t=d;r&&t<l;++t){var F=a[t];if(G[F]===G||" "===F)m(p,t,F)?p=t+1:r=!1}m(p,l,"")||(r=!1);return r?(n.length&&(p=n.join(""),null!==
e&&(p="."+e+" "+p),g.push(p)),!0):!c||c(a.slice(d,l))}var e=b.na,f=b.L,k=b.Aa,g=[],l=0,m,n=0,p;for(m=0;m<a.length;++m)(p=a[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==a[m]&&(n||G[a[m-1]]===G||G[a[m+1]]===G))||(a[l++]=a[m]);a.length=l;l=a.length;for(m=n=0;m<l;++m)if(","===a[m]){if(!d(n,m))return null;n=m+1}return d(n,l)?g: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;
-m=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}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,l,q,r,t){function F(){C=
-z.length&&null===z[z.length-1]}var u=void 0,y=t||[0],z=[],C=!1;n(e,{startStylesheet:function(){u=[]},endStylesheet:function(){},startAtrule:function(e,k){if(C)e=null;else if("@media"===e)u.push("@media"," ",m(k));else if("@keyframes"===e||"@-webkit-keyframes"===e){var g=k[0];1!==k.length||/__$|[^\w\-]/.test(g)?e=null:(u.push(e," ",g+f.L),e="@keyframes")}else if("@import"===e&&0<k.length)if(e=null,"function"===typeof r){var n=m(k.slice(1));if("not all"!==n){++y[0];var t=[];u.push(t);var F=p(d(c,a(k[0])),
-function(a){var c=b(F,a.qa,f,l,q,r,y);--y[0];a=n?{toString:function(){return"@media "+n+" {"+c.result+"}"}}:c.result;t[0]=a;r(a,!!y[0])},q)}}else window.console&&window.console.log("@import "+k.join(" ")+" elided");C=!e;z.push(e)},endAtrule:function(){z.pop();C||u.push(";");F()},startBlock:function(){C||u.push("{")},endBlock:function(){C||(u.push("}"),C=!0)},startRuleset:function(a){if(!C){var b=void 0;"@keyframes"===z[z.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-C=!b,b&&(b=b[0].replace(/ +/g,""))):(a=k(a,f),a&&a.length?b=a.join(", "):C=!0);C||u.push(b,"{")}z.push(null)},endRuleset:function(){z.pop();C||u.push("}");F()},declaration:function(a,b){if(!C){var d=!1,e=b.length;2<=e&&"!"===b[e-2]&&"important"===b[e-1].toLowerCase()&&(d=!0,b.length-=2);g(a,b,l,c,f.L);b.length&&u.push(a,":",b.join(" "),d?" !important;":";")}}});return{result:{toString:function(){return u.join("")}},va:!!y[0]}}l=function(a,c,d,e){return b(a,c,d,e,void 0,void 0).result.toString()}})()})();
+m=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}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,l,q,r,t){function F(){D=
+z.length&&null===z[z.length-1]}var u=void 0,x=t||[0],z=[],D=!1;n(e,{startStylesheet:function(){u=[]},endStylesheet:function(){},startAtrule:function(e,k){if(D)e=null;else if("@media"===e)u.push("@media"," ",m(k));else if("@keyframes"===e||"@-webkit-keyframes"===e){var g=k[0];1!==k.length||/__$|[^\w\-]/.test(g)?e=null:(u.push(e," ",g+f.L),e="@keyframes")}else if("@import"===e&&0<k.length)if(e=null,"function"===typeof r){var n=m(k.slice(1));if("not all"!==n){++x[0];var t=[];u.push(t);var F=p(d(c,a(k[0])),
+function(a){var c=b(F,a.qa,f,l,q,r,x);--x[0];a=n?{toString:function(){return"@media "+n+" {"+c.result+"}"}}:c.result;t[0]=a;r(a,!!x[0])},q)}}else window.console&&window.console.log("@import "+k.join(" ")+" elided");D=!e;z.push(e)},endAtrule:function(){z.pop();D||u.push(";");F()},startBlock:function(){D||u.push("{")},endBlock:function(){D||(u.push("}"),D=!0)},startRuleset:function(a){if(!D){var b=void 0;"@keyframes"===z[z.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+D=!b,b&&(b=b[0].replace(/ +/g,""))):(a=k(a,f),a&&a.length?b=a.join(", "):D=!0);D||u.push(b,"{")}z.push(null)},endRuleset:function(){z.pop();D||u.push("}");F()},declaration:function(a,b){if(!D){var d=!1,e=b.length;2<=e&&"!"===b[e-2]&&"important"===b[e-1].toLowerCase()&&(d=!0,b.length-=2);g(a,b,l,c,f.L);b.length&&u.push(a,":",b.join(" "),d?" !important;":";")}}});return{result:{toString:function(){return u.join("")}},va:!!x[0]}}l=function(a,c,d,e){return b(a,c,d,e,void 0,void 0).result.toString()}})()})();
"undefined"!==typeof window&&(window.sanitizeCssProperty=g,window.sanitizeCssSelectorList=k,window.sanitizeStylesheet=l,window.sanitizeMediaQuery=m);var n,p;(function(){function a(a,c,d,e,f){for(var k=c++;c<d&&"{"!==a[c]&&";"!==a[c];)++c;if(c<d&&(f||";"===a[c])){f=k+1;var g=c;f<d&&" "===a[f]&&++f;g>f&&" "===a[g-1]&&--g;e.startAtrule&&e.startAtrule(a[k].toLowerCase(),a.slice(f,g));c="{"===a[c]?b(a,c,d,e):c+1;e.endAtrule&&e.endAtrule()}return c}function b(d,e,f,k){++e;for(k.startBlock&&k.startBlock();e<
f;){var g=d[e].charAt(0);if("}"==g){++e;break}e=" "===g||";"===g?e+1:"@"===g?a(d,e,f,k,!1):"{"===g?b(d,e,f,k):c(d,e,f,k)}k.endBlock&&k.endBlock();return e}function c(a,b,c,d){var f=b,g=e(a,b,c,!0);if(0>g)return g=~g,g===f?g+1:g;var l=a[g];if("{"!==l)return g===f?g+1:g;b=g+1;g>f&&" "===a[g-1]&&--g;for(d.startRuleset&&d.startRuleset(a.slice(f,g));b<c;){l=a[b];if("}"===l){++b;break}b=" "===l?b+1:k(a,b,c,d)}d.endRuleset&&d.endRuleset();return b}function e(a,b,c,d){for(var e,f=[],k=-1;b<c;++b)if(e=a[b].charAt(0),
"["===e||"("===e)f[++k]=e;else if("]"===e&&"["===f[k]||")"===e&&"("===f[k])--k;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;0<=k&&(b=~(b+1));return b}function f(a,b,c){for(;b<c&&";"!==a[b]&&"}"!==a[b];)++b;return b<c&&";"===a[b]?b+1:b}function k(a,b,c,d){var k=a[b++];if(!g.test(k))return f(a,b,c);b<c&&" "===a[b]&&++b;if(b==c||":"!==a[b])return f(a,b,c);++b;b<c&&" "===a[b]&&++b;var l=e(a,b,c,!1);if(0>l)l=~l;else{for(var m=[],n=0,p=b;p<l;++p)b=a[p]," "!==b&&(m[n++]=b);if(l<c){do{b=
@@ -79,21 +79,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"};q.ELEMENT_DOM_INTERFACES=q.Q;q.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};q.ueffects=q.P;q.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};
-q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(a){function b(a,b){var c;if(ba.hasOwnProperty(b))c=ba[b];else{var d=b.match(T);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(D))?String.fromCharCode(parseInt(d[1],
-16)):L&&ca.test(b)?(L.innerHTML="&"+b+";",d=L.textContent,ba[b]=d):"&"+b+";"}return c}function c(a){return a.replace(X,b)}function d(a){return(""+a).replace(K,"&amp;").replace(S,"&lt;").replace(Y,"&gt;").replace(aa,"&#34;")}function e(a){return a.replace(O,"&amp;$1").replace(S,"&lt;").replace(Y,"&gt;")}function k(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(W)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d<q;){var r=c[d++],t=c[d];switch(r){case "&":fa.test(t)?(b.e&&b.e("&"+t,f,R,g(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,R,g(b,c,d,e,f));break;case "</":if(k=/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===
-t.length&&">"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,R,g(b,c,d,e,f));else{var F=c,u=d,y=b,D=f,z=R,C=e,x=n(F,u);x?(y.t&&y.t(x.name,D,z,g(y,F,u,C,D)),d=x.next):d=F.length}else b.e&&b.e("&lt;/",f,R,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,R,g(b,c,d,e,f));var V=a.f[p];V&Z&&(d=m(c,{name:p,next:d,c:V},b,f,R,e))}else{var F=c,u=b,y=f,D=R,z=e,ha=n(F,d);ha?(u.w&&u.w(ha.name,ha.R,y,D,g(u,F,ha.next,
-z,y)),d=ha.c&Z?m(F,ha,u,y,D,z):ha.next):d=F.length}else b.e&&b.e("&lt;",f,R,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l<q&&(">"!==c[l]||!/--$/.test(c[l-1]));l++);if(l<q){if(b.A){var v=c.slice(d,l).join("");b.A(v.substr(0,v.length-2),f,R,g(b,c,l+1,e,f))}d=l+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,R,g(b,c,d,e,f));break;case "<!":if(/^\w/.test(t)){if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,R,g(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,R,g(b,c,d,e,f));break;
-case "<?":if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,R,g(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,R,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,R,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(ea){if(ea!==R)throw ea;}}function m(b,c,d,f,k,l){var m=b.length;V.hasOwnProperty(c.name)||(V[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=V[c.name],p=c.next,q=c.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(c.c&a.c.CDATA)d.z&&
-d.z(m,f,k,g(d,b,q,l,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(m),f,k,g(d,b,q,l,f));else throw Error("bug");return q}function n(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var k=b[d].substr(e[0].length),g=d+1,l=b.length;g<l&&">"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=Q.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g<l;g++){if(n){if(">"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n=
-e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(J,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
+q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(a){function b(a,b){var c;if(aa.hasOwnProperty(b))c=aa[b];else{var d=b.match(S);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(C))?String.fromCharCode(parseInt(d[1],
+16)):K&&W.test(b)?(K.innerHTML="&"+b+";",d=K.textContent,aa[b]=d):"&"+b+";"}return c}function c(a){return a.replace(X,b)}function d(a){return(""+a).replace(J,"&amp;").replace(T,"&lt;").replace(ba,"&gt;").replace(Y,"&#34;")}function e(a){return a.replace(M,"&amp;$1").replace(T,"&lt;").replace(ba,"&gt;")}function k(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(Z)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d<q;){var r=c[d++],t=c[d];switch(r){case "&":O.test(t)?(b.e&&b.e("&"+t,f,R,g(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,R,g(b,c,d,e,f));break;case "</":if(k=/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===
+t.length&&">"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,R,g(b,c,d,e,f));else{var u=c,F=d,x=b,z=f,C=R,D=e,v=n(u,F);v?(x.t&&x.t(v.name,z,C,g(x,u,F,D,z)),d=v.next):d=u.length}else b.e&&b.e("&lt;/",f,R,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,R,g(b,c,d,e,f));var y=a.f[p];y&ca&&(d=m(c,{name:p,next:d,c:y},b,f,R,e))}else{var u=c,F=b,x=f,z=R,C=e,V=n(u,d);V?(F.w&&F.w(V.name,V.R,x,z,g(F,u,V.next,C,x)),
+d=V.c&ca?m(u,V,F,x,z,C):V.next):d=u.length}else b.e&&b.e("&lt;",f,R,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l<q&&(">"!==c[l]||!/--$/.test(c[l-1]));l++);if(l<q){if(b.A){var ha=c.slice(d,l).join("");b.A(ha.substr(0,ha.length-2),f,R,g(b,c,l+1,e,f))}d=l+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,R,g(b,c,d,e,f));break;case "<!":if(/^\w/.test(t)){if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,R,g(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,R,g(b,c,d,e,f));break;case "<?":if(!e.r){for(l=
+d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,R,g(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,R,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,R,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==R)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;V.hasOwnProperty(c.name)||(V[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=V[c.name],p=c.next,q=c.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(c.c&a.c.CDATA)d.z&&d.z(m,f,k,g(d,b,
+q,l,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(m),f,k,g(d,b,q,l,f));else throw Error("bug");return q}function n(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var k=b[d].substr(e[0].length),g=d+1,l=b.length;g<l&&">"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=Q.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g<l;g++){if(n){if(">"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n=
+e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(da,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
if("attribs"in m)k=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=a.f[n]):(n=c,m=l);if(l&a.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===c&&(p.v!==n||c!==n)&&g.push("</",p.v,">")}l&a.c.EMPTY||e.push({D:c,v:n});g.push("<",n);c=0;for(p=k.length;c<p;c+=2){var q=k[c],r=k[c+1];null!==r&&void 0!==r&&g.push(" ",q,'="',d(r),'"')}g.push(">");l&a.c.EMPTY&&!(m&a.c.EMPTY)&&g.push("</",n,">")}else f=!(l&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 k=e[d].D;if(k===b)break;if(!(a.f[k]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(k=e.length;--k>d;){var g=e[k].v;a.f[g]&a.c.OPTIONAL_ENDTAG||c.push("</",g,">")}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 q(a,b,c,d,e){if(!e)return null;try{var k=
f.parse(""+a);if(k&&(!k.K()||ga.test(k.W()))){var g=e(k,b,c,d);return g?g.toString():null}}catch(ja){}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 F(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function I(b,c,d,e,f){for(var k=0;k<c.length;k+=2){var g=c[k],l=c[k+1],m=l,n=null,p;if((p=
b+"::"+g,a.m.hasOwnProperty(p))||(p="*::"+g,a.m.hasOwnProperty(p)))n=a.m[p];if(null!==n)switch(n){case a.d.NONE:break;case a.d.SCRIPT:l=null;f&&r(f,b,g,m,l);break;case a.d.STYLE:if("undefined"===typeof U){l=null;f&&r(f,b,g,m,l);break}var t=[];U(l,{declaration:function(b,c){var e=b.toLowerCase();P(e,c,d?function(b){return q(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&t.push(e+": "+c.join(" "))}});l=0<t.length?t.join(" ; "):null;f&&r(f,b,g,m,l);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:l=
-e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,F(a.J,b,g),F(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function N(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:I(e,f,b,c,d)}}}function M(a,b){var c=[];p(b)(a,
-c);return c.join("")}var U,P;"undefined"!==typeof window&&(U=window.parseCssDeclarations,P=window.sanitizeCssProperty);var ba={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},T=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,ca=/^[A-Za-z][A-za-z0-9]+$/,L="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,J=/\0/g,X=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,fa=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,K=/&/g,O=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,
-S=/[<]/g,Y=/>/g,aa=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,W=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,R={},V={},ga=/^(?:https?|mailto|data)$/i,da={};da.pa=da.escapeAttrib=d;da.ra=da.makeHtmlSanitizer=p;da.sa=da.makeSaxParser=k;da.ta=da.makeTagPolicy=N;da.wa=da.normalizeRCData=e;da.xa=da.sanitize=function(a,b,c,d){return M(a,N(b,c,d))};da.ya=da.sanitizeAttribs=I;da.za=da.sanitizeWithPolicy=M;da.Ba=da.unescapeEntities=c;return da}(q);
+e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,F(a.J,b,g),F(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function N(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:I(e,f,b,c,d)}}}function L(a,b){var c=[];p(b)(a,
+c);return c.join("")}var U,P;"undefined"!==typeof window&&(U=window.parseCssDeclarations,P=window.sanitizeCssProperty);var aa={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},S=/^#(\d+)$/,C=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,K="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,da=/\0/g,X=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,O=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,J=/&/g,M=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T=
+/[<]/g,ba=/>/g,Y=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Z=3==="a,b".split(/(,)/).length,ca=a.c.CDATA|a.c.RCDATA,R={},V={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=N;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return L(a,N(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=L;ea.Ba=ea.unescapeEntities=c;return ea}(q);
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,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(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(k,m){if(!d[k]){if(!c[k]){var l="function"==typeof require&&require;if(!m&&l)return l(k,!0);if(g)return g(k,!0);l=Error("Cannot find module '"+k+"'");throw l.code="MODULE_NOT_FOUND",l;}l=d[k]={exports:{}};
@@ -103,8 +103,8 @@ new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/defla
f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),d=g.deflate(f,e),1!==d&&d!==q)return this.onEnd(d),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==e&&2!==e)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0<f.avail_in||0===f.avail_out)&&1!==d);return 4===e?(d=g.deflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===q):2!==e||(this.onEnd(q),f.avail_out=0,!0)};e.prototype.onData=
function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===q&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Deflate=e;d.deflate=f;d.deflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.gzip=function(b,c){return c=c||{},c.gzip=!0,f(b,c)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(b,c,d){function e(b){if(!(this instanceof
e))return new e(b);var c=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},b||{});c.raw&&0<=c.windowBits&&16>c.windowBits&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15));!(0<=c.windowBits&&16>c.windowBits)||b&&b.windowBits||(c.windowBits+=32);15<c.windowBits&&48>c.windowBits&&0===(15&c.windowBits)&&(c.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;b=g.inflateInit2(this.strm,c.windowBits);if(b!==m.Z_OK)throw Error(n[b]);
-this.header=new q;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/constants"),n=b("./zlib/messages"),p=b("./zlib/zstream"),q=b("./zlib/gzheader"),r=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,n,p,q,t=this.strm,u=this.options.chunkSize,C=this.options.dictionary,B=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH;
-"string"==typeof b?t.input=l.binstring2buf(b):"[object ArrayBuffer]"===r.call(b)?t.input=new Uint8Array(b):t.input=b;t.next_in=0;t.avail_in=t.input.length;do{if(0===t.avail_out&&(t.output=new k.Buf8(u),t.next_out=0,t.avail_out=u),d=g.inflate(t,m.Z_NO_FLUSH),d===m.Z_NEED_DICT&&C&&(q="string"==typeof C?l.string2buf(C):"[object ArrayBuffer]"===r.call(C)?new Uint8Array(C):C,d=g.inflateSetDictionary(this.strm,q)),d===m.Z_BUF_ERROR&&!0===B&&(d=m.Z_OK,B=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d),
+this.header=new q;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/constants"),n=b("./zlib/messages"),p=b("./zlib/zstream"),q=b("./zlib/gzheader"),r=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,n,p,q,t=this.strm,u=this.options.chunkSize,D=this.options.dictionary,B=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH;
+"string"==typeof b?t.input=l.binstring2buf(b):"[object ArrayBuffer]"===r.call(b)?t.input=new Uint8Array(b):t.input=b;t.next_in=0;t.avail_in=t.input.length;do{if(0===t.avail_out&&(t.output=new k.Buf8(u),t.next_out=0,t.avail_out=u),d=g.inflate(t,m.Z_NO_FLUSH),d===m.Z_NEED_DICT&&D&&(q="string"==typeof D?l.string2buf(D):"[object ArrayBuffer]"===r.call(D)?new Uint8Array(D):D,d=g.inflateSetDictionary(this.strm,q)),d===m.Z_BUF_ERROR&&!0===B&&(d=m.Z_OK,B=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d),
this.ended=!0,!1;t.next_out&&(0!==t.avail_out&&d!==m.Z_STREAM_END&&(0!==t.avail_in||e!==m.Z_FINISH&&e!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(t.output,t.next_out),n=t.next_out-f,p=l.buf2string(t.output,f),t.next_out=n,t.avail_out=u-n,n&&k.arraySet(t.output,t.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(t.output,t.next_out))));0===t.avail_in&&0===t.avail_out&&(B=!0)}while((0<t.avail_in||0===t.avail_out)&&d!==m.Z_STREAM_END);return d===m.Z_STREAM_END&&(e=m.Z_FINISH),
e===m.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===m.Z_OK):e!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),t.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(b,c,d){b="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if("object"!=typeof d)throw new TypeError(d+"must be non-object");for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}}return b};d.shrinkBuf=function(b,c){return b.length===
@@ -114,77 +114,77 @@ new f.Buf8(256);for(b=0;256>b;b++)l[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=
d?(c[g++]=192|d>>>6,c[g++]=128|63&d):65536>d?(c[g++]=224|d>>>12,c[g++]=128|d>>>6&63,c[g++]=128|63&d):(c[g++]=240|d>>>18,c[g++]=128|d>>>12&63,c[g++]=128|d>>>6&63,c[g++]=128|63&d);return c};d.buf2binstring=function(b){return e(b,b.length)};d.binstring2buf=function(b){for(var c=new f.Buf8(b.length),d=0,e=c.length;d<e;d++)c[d]=b.charCodeAt(d);return c};d.buf2string=function(b,c){var d,f,k,g,m=c||b.length,n=Array(2*m);for(d=f=0;d<m;)if(k=b[d++],128>k)n[f++]=k;else if(g=l[k],4<g)n[f++]=65533,d+=g-1;else{for(k&=
2===g?31:3===g?15:7;1<g&&d<m;)k=k<<6|63&b[d++],g--;1<g?n[f++]=65533:65536>k?n[f++]=k:(k-=65536,n[f++]=55296|k>>10&1023,n[f++]=56320|1023&k)}return e(n,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+l[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){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[k++]|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,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];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&&(v.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 k(b,c){H._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 l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+O,t=n[k+g-1],F=n[k+g];b.prev_length>=b.good_match&&(f>>=
-2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===F&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<r;);if(e=O-(r-k),k=r-O,e>g){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];F=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-S)){v.arraySet(b.window,
-b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=E(c.adler,e,l,g):2===c.state.wrap&&(c.adler=G(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),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<S&&0!==b.strm.avail_in)}function q(b,c){for(var d,e;;){if(b.lookahead<S){if(p(b),b.lookahead<S&&c===B)return Q;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-S&&(b.match_length=n(b,d)),b.match_length>=K)if(e=H._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=H._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<K-1?b.strstart:K-1,c===F?(k(b,!0),0===b.strm.avail_out?Z:R):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:W}function r(b,c){for(var d,e,f;;){if(b.lookahead<S){if(p(b),b.lookahead<S&&c===B)return Q;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-S&&(b.match_length=n(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=H._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&&(k(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=H._tr_tally(b,0,b.window[b.strstart-1]),e&&k(b,!1),
-b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(H._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,c===F?(k(b,!0),0===b.strm.avail_out?Z:R):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:W}function t(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 u(){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=T;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 v.Buf16(2*X);this.dyn_dtree=new v.Buf16(2*(2*L+1));this.bl_tree=new v.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 v.Buf16(fa+1);this.heap=new v.Buf16(2*ca+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*ca+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=ba,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?Y:aa,b.adler=2===c.wrap?0:1,c.last_flush=B,H._tr_init(c),I):e(b,N)}function z(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[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,k,g){if(!b)return N;var l=1;if(c===M&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>D||d!==T||8>f||15<f||0>c||9<c||0>g||g>P)return e(b,N);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+K-1)/K),m.window=new v.Buf8(2*m.w_size),m.head=new v.Buf16(m.hash_size),
-m.prev=new v.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new v.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,z(b)}var A,v=b("../utils/common"),H=b("./trees"),E=b("./adler32"),G=b("./crc32"),C=b("./messages"),B=0,F=4,I=0,N=-2,M=-1,U=1,P=4,ba=2,T=8,D=9,ca=286,L=30,J=19,X=2*ca+1,fa=15,K=3,O=258,S=O+K+1,Y=42,aa=113,Q=1,W=2,Z=3,R=4;A=[new t(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(p(b),0===b.lookahead&&c===B)return Q;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,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-S&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===F?(k(b,!0),0===b.strm.avail_out?Z:R):(b.strstart>b.block_start&&k(b,!1),Q)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32,
-32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return x(b,c,T,15,8,0)};d.deflateInit2=x;d.deflateReset=z;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,I):N};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==F)return e(b,
-0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===Y)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
-8&255)),n.gzhead.hcrc&&(b.adler=G(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=aa)):(q=T+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=aa,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
+0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=D[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&&(v.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 k(b,c){E._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 l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+M,t=n[k+g-1],F=n[k+g];b.prev_length>=b.good_match&&(f>>=
+2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===F&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<r;);if(e=M-(r-k),k=r-M,e>g){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];F=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window,
+b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=G(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+
+b.insert>=J)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+J-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<J)););}while(b.lookahead<T&&0!==b.strm.avail_in)}function q(b,c){for(var d,e;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return Q;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
+J-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=n(b,d)),b.match_length>=J)if(e=E._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-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=E._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<J-1?b.strstart:J-1,c===F?(k(b,!0),0===b.strm.avail_out?ca:R):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:Z}function r(b,c){for(var d,e,f;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return Q;if(0===
+b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-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=J-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d),5>=b.match_length&&(b.strategy===U||b.match_length===J&&4096<b.strstart-b.match_start)&&(b.match_length=J-1)),b.prev_length>=J&&b.match_length<=b.prev_length){f=
+b.strstart+b.lookahead-J;e=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);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+J-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=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=E._tr_tally(b,0,b.window[b.strstart-1]),e&&k(b,!1),
+b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(E._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===F?(k(b,!0),0===b.strm.avail_out?ca:R):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:Z}function t(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 u(){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=S;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 v.Buf16(2*X);this.dyn_dtree=new v.Buf16(2*(2*K+1));this.bl_tree=new v.Buf16(2*(2*da+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 v.Buf16(O+1);this.heap=new v.Buf16(2*W+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*W+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 x(b){var c;
+return b&&b.state?(b.total_in=b.total_out=0,b.data_type=aa,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ba:Y,b.adler=2===c.wrap?0:1,c.last_flush=B,E._tr_init(c),I):e(b,N)}function z(b){var c=x(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
+b.prev_length=J-1,b.match_available=0,b.ins_h=0);return c}function y(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===L&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>C||d!==S||8>f||15<f||0>c||9<c||0>g||g>P)return e(b,N);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+J-1)/J),m.window=new v.Buf8(2*m.w_size),m.head=new v.Buf16(m.hash_size),
+m.prev=new v.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new v.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,z(b)}var A,v=b("../utils/common"),E=b("./trees"),H=b("./adler32"),G=b("./crc32"),D=b("./messages"),B=0,F=4,I=0,N=-2,L=-1,U=1,P=4,aa=2,S=8,C=9,W=286,K=30,da=19,X=2*W+1,O=15,J=3,M=258,T=M+J+1,ba=42,Y=113,Q=1,Z=2,ca=3,R=4;A=[new t(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(p(b),0===b.lookahead&&c===B)return Q;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,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===F?(k(b,!0),0===b.strm.avail_out?ca:R):(b.strstart>b.block_start&&k(b,!1),Q)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,
+32,32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return y(b,c,S,15,8,0)};d.deflateInit2=y;d.deflateReset=z;d.deflateResetKeep=x;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,I):N};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==F)return e(b,
+0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ba)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
+8&255)),n.gzhead.hcrc&&(b.adler=G(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=Y)):(q=S+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=Y,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-
q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=
-1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=aa)):n.status=aa),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)-
-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==F)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==B&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===B){t=Q;break a}break}if(n.match_length=0,u=H._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=Q;break a}}t=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?Z:R):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
-Q:W)}else if(3===n.strategy)a:{var D,y;for(u=n.window;;){if(n.lookahead<=O){if(p(n),n.lookahead<=O&&c===B){t=Q;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(y=n.strstart-1,D=u[y],D===u[++y]&&D===u[++y]&&D===u[++y])){for(d=n.strstart+O;D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&y<d;);n.match_length=O-(d-y);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=K?(t=H._tr_tally(n,1,n.match_length-
-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=H._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=Q;break a}}t=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?Z:R):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?Q:W)}else t=A[n.level].func(n,c);if(t!==Z&&t!==R||(n.status=666),t===Q||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===W&&(1===c?H._tr_align(n):5!==c&&(H._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0===
-n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==F?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==Y&&69!==c&&73!==c&&91!==
-c&&103!==c&&c!==aa&&666!==c?e(b,N):(b.state=null,c===aa?e(b,-3):I)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==Y||d.lookahead))return N;1===g&&(b.adler=E(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>=
-K;){e=d.strstart;k=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(--k);d.strstart=e;d.lookahead=K-1;p(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=m,b.input=n,b.avail_in=l,d.wrap=g,I};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,m,n,p,q,r,t,u,y,z,x,A,v,H,E,G,C,B,F,I,N,M;d=b.state;e=b.next_in;N=b.input;f=e+(b.avail_in-5);m=b.next_out;M=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);q=d.dmax;r=d.wsize;t=d.whave;u=d.wnext;y=d.window;z=d.hold;x=d.bits;A=d.lencode;v=d.distcode;H=(1<<d.lenbits)-
-1;E=(1<<d.distbits)-1;a:do b:for(15>x&&(z+=N[e++]<<x,x+=8,z+=N[e++]<<x,x+=8),G=A[z&H];;){if(C=G>>>24,z>>>=C,x-=C,C=G>>>16&255,0===C)M[m++]=65535&G;else{if(!(16&C)){if(0===(64&C)){G=A[(65535&G)+(z&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}B=65535&G;(C&=15)&&(x<C&&(z+=N[e++]<<x,x+=8),B+=z&(1<<C)-1,z>>>=C,x-=C);15>x&&(z+=N[e++]<<x,x+=8,z+=N[e++]<<x,x+=8);G=v[z&E];c:for(;;){if(C=G>>>24,z>>>=C,x-=C,C=G>>>16&255,!(16&C)){if(0===(64&C)){G=v[(65535&
-G)+(z&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(F=65535&G,C&=15,x<C&&(z+=N[e++]<<x,x+=8,x<C&&(z+=N[e++]<<x,x+=8)),F+=z&(1<<C)-1,F>q){b.msg="invalid distance too far back";d.mode=30;break a}if(z>>>=C,x-=C,C=m-n,F>C){if(C=F-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(G=0,I=y,0===u){if(G+=r-C,C<B){B-=C;do M[m++]=y[G++];while(--C);G=m-F;I=M}}else if(u<C){if(G+=r+u-C,C-=u,C<B){B-=C;do M[m++]=y[G++];while(--C);if(G=0,u<B){C=u;B-=C;do M[m++]=y[G++];
-while(--C);G=m-F;I=M}}}else if(G+=u-C,C<B){B-=C;do M[m++]=y[G++];while(--C);G=m-F;I=M}for(;2<B;)M[m++]=I[G++],M[m++]=I[G++],M[m++]=I[G++],B-=3;B&&(M[m++]=I[G++],1<B&&(M[m++]=I[G++]))}else{G=m-F;do M[m++]=M[G++],M[m++]=M[G++],M[m++]=M[G++],B-=3;while(2<B);B&&(M[m++]=M[G++],1<B&&(M[m++]=M[G++]))}break}}break}while(e<f&&m<p);B=x>>3;e-=B;x-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=z&(1<<x)-1;d.bits=x}},{}],11:[function(b,c,d){function e(b){return(b>>>
+1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=Y)):n.status=Y),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)-
+(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==F)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==B&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===B){t=Q;break a}break}if(n.match_length=0,u=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=Q;break a}}t=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ca:R):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
+Q:Z)}else if(3===n.strategy)a:{var x,C;for(u=n.window;;){if(n.lookahead<=M){if(p(n),n.lookahead<=M&&c===B){t=Q;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=J&&0<n.strstart&&(C=n.strstart-1,x=u[C],x===u[++C]&&x===u[++C]&&x===u[++C])){for(d=n.strstart+M;x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&C<d;);n.match_length=M-(d-C);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=J?(t=E._tr_tally(n,1,n.match_length-
+J),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=Q;break a}}t=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ca:R):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?Q:Z)}else t=A[n.level].func(n,c);if(t!==ca&&t!==R||(n.status=666),t===Q||t===ca)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Z&&(1===c?E._tr_align(n):5!==c&&(E._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),
+0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==F?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==ba&&69!==c&&73!==c&&
+91!==c&&103!==c&&c!==Y&&666!==c?e(b,N):(b.state=null,c===Y?e(b,-3):I)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==ba||d.lookahead))return N;1===g&&(b.adler=H(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>=
+J;){e=d.strstart;k=d.lookahead-(J-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+J-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=J-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=J-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,I};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,m,n,p,q,r,t,u,x,z,y,A,v,E,H,G,D,B,F,I,N,L;d=b.state;e=b.next_in;N=b.input;f=e+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);q=d.dmax;r=d.wsize;t=d.whave;u=d.wnext;x=d.window;z=d.hold;y=d.bits;A=d.lencode;v=d.distcode;E=(1<<d.lenbits)-
+1;H=(1<<d.distbits)-1;a:do b:for(15>y&&(z+=N[e++]<<y,y+=8,z+=N[e++]<<y,y+=8),G=A[z&E];;){if(D=G>>>24,z>>>=D,y-=D,D=G>>>16&255,0===D)L[m++]=65535&G;else{if(!(16&D)){if(0===(64&D)){G=A[(65535&G)+(z&(1<<D)-1)];continue b}if(32&D){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}B=65535&G;(D&=15)&&(y<D&&(z+=N[e++]<<y,y+=8),B+=z&(1<<D)-1,z>>>=D,y-=D);15>y&&(z+=N[e++]<<y,y+=8,z+=N[e++]<<y,y+=8);G=v[z&H];c:for(;;){if(D=G>>>24,z>>>=D,y-=D,D=G>>>16&255,!(16&D)){if(0===(64&D)){G=v[(65535&
+G)+(z&(1<<D)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(F=65535&G,D&=15,y<D&&(z+=N[e++]<<y,y+=8,y<D&&(z+=N[e++]<<y,y+=8)),F+=z&(1<<D)-1,F>q){b.msg="invalid distance too far back";d.mode=30;break a}if(z>>>=D,y-=D,D=m-n,F>D){if(D=F-D,D>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(G=0,I=x,0===u){if(G+=r-D,D<B){B-=D;do L[m++]=x[G++];while(--D);G=m-F;I=L}}else if(u<D){if(G+=r+u-D,D-=u,D<B){B-=D;do L[m++]=x[G++];while(--D);if(G=0,u<B){D=u;B-=D;do L[m++]=x[G++];
+while(--D);G=m-F;I=L}}}else if(G+=u-D,D<B){B-=D;do L[m++]=x[G++];while(--D);G=m-F;I=L}for(;2<B;)L[m++]=I[G++],L[m++]=I[G++],L[m++]=I[G++],B-=3;B&&(L[m++]=I[G++],1<B&&(L[m++]=I[G++]))}else{G=m-F;do L[m++]=L[G++],L[m++]=L[G++],L[m++]=L[G++],B-=3;while(2<B);B&&(L[m++]=L[G++],1<B&&(L[m++]=L[G++]))}break}}break}while(e<f&&m<p);B=y>>3;e-=B;y-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=z&(1<<y)-1;d.bits=y}},{}],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=v,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(H),c.distcode=c.distdyn=new r.Buf32(E),c.sane=1,c.back=-1,x):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(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)?A:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):A}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==x&&(b.state=null),d):A}function n(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 p,q,r=b("../utils/common"),t=b("./adler32"),u=b("./crc32"),y=b("./inffast"),z=b("./inftrees"),x=0,A=-2,v=1,H=852,E=592,G=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,C,B,D,ca,L,J,H,E,K,O,S,Y,aa,Q,W,Z,R=0,V=new r.Buf8(4),ga=[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 A;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;ca=m;L=C;W=x;a:for(;;)switch(d.mode){case v:if(0===d.wrap){d.mode=13;break}for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(2&d.wrap&&35615===B){d.check=0;V[0]=255&B;V[1]=B>>>8&255;d.check=u(d.check,V,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check";
-d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,Q=(15&B)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.mode=512&B?10:12;D=B=0;break;case 2:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.flags=B,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=B>>8&1);512&d.flags&&
-(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));D=B=0;d.mode=3;case 3:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.head&&(d.head.time=B);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,V[2]=B>>>16&255,V[3]=B>>>24&255,d.check=u(d.check,V,4,0));D=B=0;d.mode=4;case 4:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.head&&(d.head.xflags=255&B,d.head.os=B>>8);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));D=B=0;d.mode=5;case 5:if(1024&d.flags){for(;16>D;){if(0===m)break a;m--;
-B+=f[g++]<<D;D+=8}d.length=B;d.head&&(d.head.extra_len=B);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(J=d.length,J>m&&(J=m),J&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,J,Q)),512&d.flags&&(d.check=u(d.check,f,J,g)),m-=J,g+=J,d.length-=J),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;J=0;do Q=f[g+
-J++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&J<m);if(512&d.flags&&(d.check=u(d.check,f,J,g)),m-=J,g+=J,Q)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;J=0;do Q=f[g+J++],d.head&&Q&&65536>d.length&&(d.head.comment+=String.fromCharCode(Q));while(Q&&J<m);if(512&d.flags&&(d.check=u(d.check,f,J,g)),m-=J,g+=J,Q)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>D;){if(0===m)break a;m--;
-B+=f[g++]<<D;D+=8}if(B!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}D=B=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>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}b.adler=d.check=e(B);D=B=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){B>>>=7&D;D-=7&D;d.mode=27;break}for(;3>D;){if(0===
-m)break a;m--;B+=f[g++]<<D;D+=8}switch(d.last=1&B,B>>>=1,--D,3&B){case 0:d.mode=14;break;case 1:O=d;if(G){p=new r.Buf32(512);q=new r.Buf32(32);for(E=0;144>E;)O.lens[E++]=8;for(;256>E;)O.lens[E++]=9;for(;280>E;)O.lens[E++]=7;for(;288>E;)O.lens[E++]=8;z(1,O.lens,0,288,p,0,O.work,{bits:9});for(E=0;32>E;)O.lens[E++]=5;z(2,O.lens,0,32,q,0,O.work,{bits:5});G=!1}O.lencode=p;O.lenbits=9;O.distcode=q;O.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
-d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if((65535&B)!==(B>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(J=d.length){if(J>m&&(J=m),J>C&&(J=C),0===J)break a;r.arraySet(k,f,g,J,l);m-=J;g+=J;C-=J;l+=J;d.length-=J;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.nlen=(31&B)+257,B>>>=5,D-=5,d.ndist=(31&B)+
-1,B>>>=5,D-=5,d.ncode=(15&B)+4,B>>>=4,D-=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>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.lens[ga[d.have++]]=7&B;B>>>=3;D-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},W=z(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,W){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(;R=d.lencode[B&(1<<d.lenbits)-1],K=R>>>24,O=65535&R,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(16>O)B>>>=K,D-=K,d.lens[d.have++]=O;else{if(16===O){for(E=K+2;D<E;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B>>>=K,D-=K,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];J=3+(3&B);B>>>=2;D-=2}else if(17===O){for(E=K+3;D<E;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=K;D-=K;Q=0;J=3+(7&B);B>>>=3;D-=3}else{for(E=K+7;D<E;){if(0===m)break a;m--;
-B+=f[g++]<<D;D+=8}B>>>=K;D-=K;Q=0;J=11+(127&B);B>>>=7;D-=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++]=Q}}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,Z={bits:d.lenbits},W=z(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,W){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},W=z(2,d.lens,d.nlen,d.ndist,
-d.distcode,0,d.work,Z),d.distbits=Z.bits,W){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<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,L);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;R=d.lencode[B&(1<<d.lenbits)-1],K=R>>>24,E=R>>>16&255,O=65535&R,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(E&&0===(240&E)){S=
-K;Y=E;for(aa=O;R=d.lencode[aa+((B&(1<<S+Y)-1)>>S)],K=R>>>24,E=R>>>16&255,O=65535&R,!(S+K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=S;D-=S;d.back+=S}if(B>>>=K,D-=K,d.back+=K,d.length=O,0===E){d.mode=26;break}if(32&E){d.back=-1;d.mode=12;break}if(64&E){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&E;d.mode=22;case 22:if(d.extra){for(E=d.extra;D<E;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.length+=B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
-23;case 23:for(;R=d.distcode[B&(1<<d.distbits)-1],K=R>>>24,E=R>>>16&255,O=65535&R,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(0===(240&E)){S=K;Y=E;for(aa=O;R=d.distcode[aa+((B&(1<<S+Y)-1)>>S)],K=R>>>24,E=R>>>16&255,O=65535&R,!(S+K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=S;D-=S;d.back+=S}if(B>>>=K,D-=K,d.back+=K,64&E){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&E;d.mode=24;case 24:if(d.extra){for(E=d.extra;D<E;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.offset+=
-B&(1<<d.extra)-1;B>>>=d.extra;D-=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=L-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,H=d.wsize-J):H=d.wnext-J;J>d.length&&(J=d.length);E=d.window}else E=k,H=l-d.offset,J=d.length;J>C&&(J=C);C-=J;d.length-=J;do k[l++]=E[H++];while(--J);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
-k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<<D;D+=8}if(L-=C,b.total_out+=L,d.total+=L,L&&(b.adler=d.check=d.flags?u(d.check,k,L,l-L):t(d.check,k,L,l-L)),L=C,(d.flags?B:e(B))!==d.check){b.msg="incorrect data check";d.mode=30;break}D=B=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}D=B=0}d.mode=29;case 29:W=1;break a;case 30:W=
--3;break a;case 31:return-4;default:return A}return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,(d.wsize||L!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,L-b.avail_out)?(d.mode=31,-4):(ca-=b.avail_in,L-=b.avail_out,b.total_in+=ca,b.total_out+=L,d.total+=L,d.wrap&&L&&(b.adler=d.check=d.flags?u(d.check,k,L,b.next_out-L):t(d.check,k,L,b.next_out-L)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===ca&&0===L||
-4===c)&&W===x&&(W=-5),W)};d.inflateEnd=function(b){if(!b||!b.state)return A;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)?A:(d.head=c,c.done=!1,x)):A};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?A:11===d.mode&&(e=1,e=t(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):A};d.inflateInfo="pako inflate (from Nodeca project)"},
+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=v,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(E),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,y):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(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)?A:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):A}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==y&&(b.state=null),d):A}function n(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 p,q,r=b("../utils/common"),t=b("./adler32"),u=b("./crc32"),x=b("./inffast"),z=b("./inftrees"),y=0,A=-2,v=1,E=852,H=592,G=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,D,B,C,W,K,E,H,O,J,M,T,ba,Y,Q,Z,ca,R=0,V=new r.Buf8(4),ga=[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 A;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;D=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;C=d.bits;W=m;K=D;Z=y;a:for(;;)switch(d.mode){case v:if(0===d.wrap){d.mode=13;break}for(;16>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(2&d.wrap&&35615===B){d.check=0;V[0]=255&B;V[1]=B>>>8&255;d.check=u(d.check,V,2,0);C=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check";
+d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,C-=4,Q=(15&B)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.mode=512&B?10:12;C=B=0;break;case 2:for(;16>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(d.flags=B,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=B>>8&1);512&d.flags&&
+(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));C=B=0;d.mode=3;case 3:for(;32>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}d.head&&(d.head.time=B);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,V[2]=B>>>16&255,V[3]=B>>>24&255,d.check=u(d.check,V,4,0));C=B=0;d.mode=4;case 4:for(;16>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}d.head&&(d.head.xflags=255&B,d.head.os=B>>8);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));C=B=0;d.mode=5;case 5:if(1024&d.flags){for(;16>C;){if(0===m)break a;m--;
+B+=f[g++]<<C;C+=8}d.length=B;d.head&&(d.head.extra_len=B);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));C=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(E=d.length,E>m&&(E=m),E&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,E,Q)),512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,d.length-=E),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;E=0;do Q=f[g+
+E++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&E<m);if(512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,Q)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;E=0;do Q=f[g+E++],d.head&&Q&&65536>d.length&&(d.head.comment+=String.fromCharCode(Q));while(Q&&E<m);if(512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,Q)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>C;){if(0===m)break a;m--;
+B+=f[g++]<<C;C+=8}if(B!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}C=B=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>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}b.adler=d.check=e(B);C=B=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=D,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=C,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){B>>>=7&C;C-=7&C;d.mode=27;break}for(;3>C;){if(0===
+m)break a;m--;B+=f[g++]<<C;C+=8}switch(d.last=1&B,B>>>=1,--C,3&B){case 0:d.mode=14;break;case 1:M=d;if(G){p=new r.Buf32(512);q=new r.Buf32(32);for(O=0;144>O;)M.lens[O++]=8;for(;256>O;)M.lens[O++]=9;for(;280>O;)M.lens[O++]=7;for(;288>O;)M.lens[O++]=8;z(1,M.lens,0,288,p,0,M.work,{bits:9});for(O=0;32>O;)M.lens[O++]=5;z(2,M.lens,0,32,q,0,M.work,{bits:5});G=!1}M.lencode=p;M.lenbits=9;M.distcode=q;M.distbits=5;if(d.mode=20,6===c){B>>>=2;C-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
+d.mode=30}B>>>=2;C-=2;break;case 14:B>>>=7&C;for(C-=7&C;32>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if((65535&B)!==(B>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,C=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(E=d.length){if(E>m&&(E=m),E>D&&(E=D),0===E)break a;r.arraySet(k,f,g,E,l);m-=E;g+=E;D-=E;l+=E;d.length-=E;break}d.mode=12;break;case 17:for(;14>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(d.nlen=(31&B)+257,B>>>=5,C-=5,d.ndist=(31&B)+
+1,B>>>=5,C-=5,d.ncode=(15&B)+4,B>>>=4,C-=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>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}d.lens[ga[d.have++]]=7&B;B>>>=3;C-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,ca={bits:d.lenbits},Z=z(0,d.lens,0,19,d.lencode,0,d.work,ca),d.lenbits=ca.bits,Z){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(;R=d.lencode[B&(1<<d.lenbits)-1],J=R>>>24,M=65535&R,!(J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(16>M)B>>>=J,C-=J,d.lens[d.have++]=M;else{if(16===M){for(O=J+2;C<O;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(B>>>=J,C-=J,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];E=3+(3&B);B>>>=2;C-=2}else if(17===M){for(O=J+3;C<O;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}B>>>=J;C-=J;Q=0;E=3+(7&B);B>>>=3;C-=3}else{for(O=J+7;C<O;){if(0===m)break a;m--;
+B+=f[g++]<<C;C+=8}B>>>=J;C-=J;Q=0;E=11+(127&B);B>>>=7;C-=7}if(d.have+E>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;E--;)d.lens[d.have++]=Q}}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,ca={bits:d.lenbits},Z=z(1,d.lens,0,d.nlen,d.lencode,0,d.work,ca),d.lenbits=ca.bits,Z){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,ca={bits:d.distbits},Z=z(2,d.lens,d.nlen,d.ndist,
+d.distcode,0,d.work,ca),d.distbits=ca.bits,Z){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<=m&&258<=D){b.next_out=l;b.avail_out=D;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=C;x(b,K);l=b.next_out;k=b.output;D=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;C=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;R=d.lencode[B&(1<<d.lenbits)-1],J=R>>>24,O=R>>>16&255,M=65535&R,!(J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(O&&0===(240&
+O)){T=J;ba=O;for(Y=M;R=d.lencode[Y+((B&(1<<T+ba)-1)>>T)],J=R>>>24,O=R>>>16&255,M=65535&R,!(T+J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}B>>>=T;C-=T;d.back+=T}if(B>>>=J,C-=J,d.back+=J,d.length=M,0===O){d.mode=26;break}if(32&O){d.back=-1;d.mode=12;break}if(64&O){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&O;d.mode=22;case 22:if(d.extra){for(O=d.extra;C<O;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}d.length+=B&(1<<d.extra)-1;B>>>=d.extra;C-=d.extra;d.back+=d.extra}d.was=d.length;
+d.mode=23;case 23:for(;R=d.distcode[B&(1<<d.distbits)-1],J=R>>>24,O=R>>>16&255,M=65535&R,!(J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(0===(240&O)){T=J;ba=O;for(Y=M;R=d.distcode[Y+((B&(1<<T+ba)-1)>>T)],J=R>>>24,O=R>>>16&255,M=65535&R,!(T+J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}B>>>=T;C-=T;d.back+=T}if(B>>>=J,C-=J,d.back+=J,64&O){b.msg="invalid distance code";d.mode=30;break}d.offset=M;d.extra=15&O;d.mode=24;case 24:if(d.extra){for(O=d.extra;C<O;){if(0===m)break a;m--;B+=f[g++]<<C;C+=
+8}d.offset+=B&(1<<d.extra)-1;B>>>=d.extra;C-=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===D)break a;if(E=K-D,d.offset>E){if(E=d.offset-E,E>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}E>d.wnext?(E-=d.wnext,H=d.wsize-E):H=d.wnext-E;E>d.length&&(E=d.length);O=d.window}else O=k,H=l-d.offset,E=d.length;E>D&&(E=D);D-=E;d.length-=E;do k[l++]=O[H++];while(--E);0===d.length&&(d.mode=21);break;case 26:if(0===
+D)break a;k[l++]=d.length;D--;d.mode=21;break;case 27:if(d.wrap){for(;32>C;){if(0===m)break a;m--;B|=f[g++]<<C;C+=8}if(K-=D,b.total_out+=K,d.total+=K,K&&(b.adler=d.check=d.flags?u(d.check,k,K,l-K):t(d.check,k,K,l-K)),K=D,(d.flags?B:e(B))!==d.check){b.msg="incorrect data check";d.mode=30;break}C=B=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(B!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}C=B=0}d.mode=29;case 29:Z=1;break a;
+case 30:Z=-3;break a;case 31:return-4;default:return A}return b.next_out=l,b.avail_out=D,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=C,(d.wsize||K!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,K-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,K-=b.avail_out,b.total_in+=W,b.total_out+=K,d.total+=K,d.wrap&&K&&(b.adler=d.check=d.flags?u(d.check,k,K,b.next_out-K):t(d.check,k,K,b.next_out-K)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&
+0===K||4===c)&&Z===y&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return A;var c=b.state;return c.window&&(c.window=null),b.state=null,y};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?A:(d.head=c,c.done=!1,y)):A};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?A:11===d.mode&&(e=1,e=t(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,y)):A};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],k=[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],l=[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,q,r,t,u,y){var m,n,p,v,H,E,G,C,B=y.bits,F,I,N,M,U,P,ba=0,T,D=null,ca=0,L=new e.Buf16(16);v=new e.Buf16(16);var J=null,X=0;for(F=0;15>=F;F++)L[F]=0;for(I=0;I<q;I++)L[c[d+I]]++;M=B;for(N=15;1<=N&&0===L[N];N--);if(M>N&&(M=N),0===N)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B<N&&0===L[B];B++);M<B&&(M=B);for(F=m=1;15>=F;F++)if(m<<=1,m-=L[F],0>m)return-1;if(0<m&&(0===b||1!==N))return-1;v[1]=0;for(F=1;15>F;F++)v[F+1]=v[F]+L[F];
-for(I=0;I<q;I++)0!==c[d+I]&&(u[v[c[d+I]]++]=I);if(0===b?(D=J=u,H=19):1===b?(D=f,ca-=257,J=g,X-=257,H=256):(D=k,J=l,H=-1),T=0,I=0,F=B,v=t,U=M,P=0,p=-1,ba=1<<M,q=ba-1,1===b&&852<ba||2===b&&592<ba)return 1;for(var fa=0;;){fa++;E=F-P;u[I]<H?(G=0,C=u[I]):u[I]>H?(G=J[X+u[I]],C=D[ca+u[I]]):(G=96,C=0);m=1<<F-P;B=n=1<<U;do n-=m,r[v+(T>>P)+n]=E<<24|G<<16|C|0;while(0!==n);for(m=1<<F-1;T&m;)m>>=1;if(0!==m?(T&=m-1,T+=m):T=0,I++,0===--L[F]){if(F===N)break;F=c[d+u[I]]}if(F>M&&(T&q)!==p){0===P&&(P=M);v+=B;U=F-P;
-for(m=1<<U;U+P<N&&(m-=L[U+P],!(0>=m));)U++,m<<=1;if(ba+=1<<U,1===b&&852<ba||2===b&&592<ba)return 1;p=T&q;r[p]=M<<24|U<<16|v-t|0}}return 0!==T&&(r[v+T]=F-P<<24|4194304),y.bits=M,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 k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>ba-d?(b.bi_buf|=c<<b.bi_valid&65535,k(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 m(b,c,d){l(b,d[2*c],d[2*c+1])}function n(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;
-while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(P+1),k=0;for(e=1;e<=P;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;c<I;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<M;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*T]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?k(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 t(b,c,d,e){var f=2*c,k=2*d;
-return b[f]<b[k]||b[f]===b[k]&&e[c]<=e[d]}function u(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&t(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(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,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=aa[f],m(b,k+F+1,c),g=J[k],0!==g&&(f-=Q[k],l(b,f,g)),e--,k=256>e?Y[e]:Y[256+(e>>>7)],m(b,k,d),g=X[k],0!==g&&(e-=
-W[k],l(b,e,g)));while(n<b.last_lit)}m(b,T,c)}function z(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],
-b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,u(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,g=c.dyn_tree,l=c.max_code,r=c.stat_desc.static_tree,t=c.stat_desc.has_stree,D=c.stat_desc.extra_bits,y=c.stat_desc.extra_base,z=c.stat_desc.max_length,x=0;for(e=0;e<=P;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<U;d++)f=b.heap[d],e=g[2*g[2*f+1]+1]+
-1,e>z&&(e=z,x++),g[2*f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=y&&(n=D[f-y]),q=g[2*f],b.opt_len+=q*(e+n),t&&(b.static_len+=q*(r[2*f+1]+n)));if(0!==x){do{for(e=z-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[z]--;x-=2}while(0<x);for(e=z;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function x(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,
-g=c[2*(e+1)+1],++l<m&&f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*D]++):10>=l?b.bl_tree[2*ca]++:b.bl_tree[2*L]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,D,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,ca,b.bl_tree),l(b,n-3,3)):(m(b,L,b.bl_tree),l(b,n-11,7));
-n=0;k=f;0===g?(p=138,q=3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return G;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<F;c++)if(0!==b.dyn_ltree[2*c])return C;return G}function H(b,c,d,e){l(b,(B<<1)+(e?1:0),3);r(b);k(b,d);k(b,~d);E.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var E=b("../utils/common"),G=0,C=1,B=0,F=256,I=F+1+29,N=30,M=19,U=2*I+1,P=15,ba=16,T=256,D=16,ca=
-17,L=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],X=[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],fa=[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],O=Array(2*(I+2));e(O);var S=Array(2*N);e(S);var Y=Array(512);e(Y);var aa=Array(256);e(aa);var Q=Array(29);e(Q);var W=Array(N);e(W);var Z,R,V,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(P+1);for(e=d=0;28>e;e++)for(Q[e]=d,c=0;c<1<<J[e];c++)aa[d++]=e;aa[d-1]=
-e;for(e=d=0;16>e;e++)for(W[e]=d,c=0;c<1<<X[e];c++)Y[d++]=e;for(d>>=7;e<N;e++)for(W[e]=d<<7,c=0;c<1<<X[e]-7;c++)Y[256+d++]=e;for(c=0;c<=P;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,I+1,k);for(c=0;c<N;c++)S[2*c+1]=5,S[2*c]=n(c,5);Z=new f(O,J,F+1,I,P);R=new f(S,X,0,N,P);V=new f([],fa,0,M,7);ga=!0}b.l_desc=new g(b.dyn_ltree,Z);b.d_desc=new g(b.dyn_dtree,R);b.bl_desc=new g(b.bl_tree,V);b.bi_buf=
-0;b.bi_valid=0;q(b)};d._tr_stored_block=H;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=v(b));z(b,b.l_desc);z(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);z(b,b.bl_desc);for(g=M-1;3<=g&&0===b.bl_tree[2*K[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)H(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,O,S);else{l(b,4+(e?
-1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*K[f]+1],3);A(b,b.dyn_ltree,c-1);A(b,b.dyn_dtree,d-1);y(b,b.dyn_ltree,b.dyn_dtree)}q(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]+F+1)]++,b.dyn_dtree[2*(256>c?Y[c]:Y[256+
-(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,T,O);16===b.bi_valid?(k(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=
+25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,q,r,t,u,x){var m,n,p,v,E,H,G,D,B=x.bits,F,I,N,L,U,P,aa=0,S,C=null,W=0,K=new e.Buf16(16);v=new e.Buf16(16);var da=null,X=0;for(F=0;15>=F;F++)K[F]=0;for(I=0;I<q;I++)K[c[d+I]]++;L=B;for(N=15;1<=N&&0===K[N];N--);if(L>N&&(L=N),0===N)return r[t++]=20971520,r[t++]=20971520,x.bits=1,0;for(B=1;B<N&&0===K[B];B++);L<B&&(L=B);for(F=m=1;15>=F;F++)if(m<<=1,m-=K[F],0>m)return-1;if(0<m&&(0===b||1!==N))return-1;v[1]=0;for(F=1;15>F;F++)v[F+1]=v[F]+K[F];
+for(I=0;I<q;I++)0!==c[d+I]&&(u[v[c[d+I]]++]=I);if(0===b?(C=da=u,E=19):1===b?(C=f,W-=257,da=g,X-=257,E=256):(C=k,da=l,E=-1),S=0,I=0,F=B,v=t,U=L,P=0,p=-1,aa=1<<L,q=aa-1,1===b&&852<aa||2===b&&592<aa)return 1;for(var O=0;;){O++;H=F-P;u[I]<E?(G=0,D=u[I]):u[I]>E?(G=da[X+u[I]],D=C[W+u[I]]):(G=96,D=0);m=1<<F-P;B=n=1<<U;do n-=m,r[v+(S>>P)+n]=H<<24|G<<16|D|0;while(0!==n);for(m=1<<F-1;S&m;)m>>=1;if(0!==m?(S&=m-1,S+=m):S=0,I++,0===--K[F]){if(F===N)break;F=c[d+u[I]]}if(F>L&&(S&q)!==p){0===P&&(P=L);v+=B;U=F-P;
+for(m=1<<U;U+P<N&&(m-=K[U+P],!(0>=m));)U++,m<<=1;if(aa+=1<<U,1===b&&852<aa||2===b&&592<aa)return 1;p=S&q;r[p]=L<<24|U<<16|v-t|0}}return 0!==S&&(r[v+S]=F-P<<24|4194304),x.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 k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>aa-d?(b.bi_buf|=c<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=c>>aa-b.bi_valid,b.bi_valid+=d-aa):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function m(b,c,d){l(b,d[2*c],d[2*c+1])}function n(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;
+while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(P+1),k=0;for(e=1;e<=P;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;c<I;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<L;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*S]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?k(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 t(b,c,d,e){var f=2*c,k=2*d;
+return b[f]<b[k]||b[f]===b[k]&&e[c]<=e[d]}function u(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&t(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function x(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=Y[f],m(b,k+F+1,c),g=da[k],0!==g&&(f-=Q[k],l(b,f,g)),e--,k=256>e?ba[e]:ba[256+(e>>>7)],m(b,k,d),g=X[k],0!==g&&
+(e-=Z[k],l(b,e,g)));while(n<b.last_lit)}m(b,S,c)}function z(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],
+b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,u(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,g=c.dyn_tree,l=c.max_code,r=c.stat_desc.static_tree,t=c.stat_desc.has_stree,x=c.stat_desc.extra_bits,C=c.stat_desc.extra_base,z=c.stat_desc.max_length,v=0;for(e=0;e<=P;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<U;d++)f=b.heap[d],e=g[2*g[2*f+1]+1]+
+1,e>z&&(e=z,v++),g[2*f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=C&&(n=x[f-C]),q=g[2*f],b.opt_len+=q*(e+n),t&&(b.static_len+=q*(r[2*f+1]+n)));if(0!==v){do{for(e=z-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[z]--;v-=2}while(0<v);for(e=z;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function y(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,
+g=c[2*(e+1)+1],++l<m&&f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*C]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*K]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,C,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,K,b.bl_tree),l(b,n-11,7));n=
+0;k=f;0===g?(p=138,q=3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return G;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(c=32;c<F;c++)if(0!==b.dyn_ltree[2*c])return D;return G}function E(b,c,d,e){l(b,(B<<1)+(e?1:0),3);r(b);k(b,d);k(b,~d);H.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var H=b("../utils/common"),G=0,D=1,B=0,F=256,I=F+1+29,N=30,L=19,U=2*I+1,P=15,aa=16,S=256,C=16,W=17,
+K=18,da=[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],X=[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],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=Array(2*(I+2));e(M);var T=Array(2*N);e(T);var ba=Array(512);e(ba);var Y=Array(256);e(Y);var Q=Array(29);e(Q);var Z=Array(N);e(Z);var ca,R,V,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(P+1);for(e=d=0;28>e;e++)for(Q[e]=d,c=0;c<1<<da[e];c++)Y[d++]=e;Y[d-1]=e;
+for(e=d=0;16>e;e++)for(Z[e]=d,c=0;c<1<<X[e];c++)ba[d++]=e;for(d>>=7;e<N;e++)for(Z[e]=d<<7,c=0;c<1<<X[e]-7;c++)ba[256+d++]=e;for(c=0;c<=P;c++)k[c]=0;for(c=0;143>=c;)M[2*c+1]=8,c++,k[8]++;for(;255>=c;)M[2*c+1]=9,c++,k[9]++;for(;279>=c;)M[2*c+1]=7,c++,k[7]++;for(;287>=c;)M[2*c+1]=8,c++,k[8]++;p(M,I+1,k);for(c=0;c<N;c++)T[2*c+1]=5,T[2*c]=n(c,5);ca=new f(M,da,F+1,I,P);R=new f(T,X,0,N,P);V=new f([],O,0,L,7);ga=!0}b.l_desc=new g(b.dyn_ltree,ca);b.d_desc=new g(b.dyn_dtree,R);b.bl_desc=new g(b.bl_tree,V);
+b.bi_buf=0;b.bi_valid=0;q(b)};d._tr_stored_block=E;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=v(b));z(b,b.l_desc);z(b,b.d_desc);y(b,b.dyn_ltree,b.l_desc.max_code);y(b,b.dyn_dtree,b.d_desc.max_code);z(b,b.bl_desc);for(g=L-1;3<=g&&0===b.bl_tree[2*J[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)E(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),x(b,M,T);else{l(b,
+4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*J[f]+1],3);A(b,b.dyn_ltree,c-1);A(b,b.dyn_dtree,d-1);x(b,b.dyn_ltree,b.dyn_dtree)}q(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*(Y[d]+F+1)]++,b.dyn_dtree[2*(256>c?ba[c]:ba[256+
+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,S,M);16===b.bi_valid?(k(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}]},{},[])("/")});window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
@@ -249,8 +249,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,k,l){k-=a;l-=b;if(0===c||0===d)return q;
-c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),q=Math.sin(e*Math.PI/180);e=p*m+q*n;var m=-1*q*m+p*n,n=e*e,r=m*m,t=c*c,u=d*d,y=n/t+r/u;1<y?(c*=Math.sqrt(y),d*=Math.sqrt(y),f=0):(y=1,f===g&&(y=-1),f=y*Math.sqrt((t*u-t*r-u*n)/(t*r+u*n)));n=f*c*m/d;r=-1*f*d*e/c;k=p*n-q*r+k/2;l=q*n+p*r+l/2;t=Math.atan2((m-r)/d,(e-n)/c)-Math.atan2(0,1);f=0<=t?t:2*Math.PI+t;t=Math.atan2((-m-r)/d,(-e-n)/c)-Math.atan2((m-r)/d,(e-n)/c);e=0<=t?t:2*Math.PI+t;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;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=q;d*=q;for(var z=Math.cos(f),x=Math.sin(f),r=-m*(n*x+d*z),t=-m*(c*x-p*z),q=[],A=0;A<g;++A){f+=e;var z=Math.cos(f),x=Math.sin(f),u=n*z-d*x+k,y=c*z+p*x+l,v=-m*(n*x+d*z),z=-m*(c*x-p*z),x=6*A;q[x]=Number(r+a);q[x+1]=Number(t+b);q[x+2]=Number(u-v+a);q[x+3]=Number(y-z+b);q[x+4]=Number(u+a);q[x+5]=Number(y+b);r=u+v;t=y+z}return q},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 m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),q=Math.sin(e*Math.PI/180);e=p*m+q*n;var m=-1*q*m+p*n,n=e*e,r=m*m,t=c*c,u=d*d,x=n/t+r/u;1<x?(c*=Math.sqrt(x),d*=Math.sqrt(x),f=0):(x=1,f===g&&(x=-1),f=x*Math.sqrt((t*u-t*r-u*n)/(t*r+u*n)));n=f*c*m/d;r=-1*f*d*e/c;k=p*n-q*r+k/2;l=q*n+p*r+l/2;t=Math.atan2((m-r)/d,(e-n)/c)-Math.atan2(0,1);f=0<=t?t:2*Math.PI+t;t=Math.atan2((-m-r)/d,(-e-n)/c)-Math.atan2((m-r)/d,(e-n)/c);e=0<=t?t:2*Math.PI+t;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;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=q;d*=q;for(var z=Math.cos(f),y=Math.sin(f),r=-m*(n*y+d*z),t=-m*(c*y-p*z),q=[],A=0;A<g;++A){f+=e;var z=Math.cos(f),y=Math.sin(f),u=n*z-d*y+k,x=c*z+p*y+l,v=-m*(n*y+d*z),z=-m*(c*y-p*z),y=6*A;q[y]=Number(r+a);q[y+1]=Number(t+b);q[y+2]=Number(u-v+a);q[y+3]=Number(x-z+b);q[y+4]=Number(u+a);q[y+5]=Number(x+b);r=u+v;t=x+z}return q},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;
@@ -523,13 +523,13 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&n
mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxConstants.ALIGN_MIDDLE?g-=d/2:f==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=k&&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!=m&&(e+="rotate("+m+","+-l+","+-g+")");
n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0<d&&(t+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var t=k&&0<c?t+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var y=this.createElement("foreignObject");y.setAttribute("style","overflow:visible;");y.setAttribute("pointer-events","all");t=this.createDiv(e,f,g,t,m);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(y);this.root.appendChild(u);var z,x;q=z=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
-document?(t.style.visibility="hidden",document.body.appendChild(t)):y.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==y&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(H=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<
-A.offsetWidth&&(t.style.whiteSpace=H));z=v+z-1;k&&"fill"!=m&&"width"!=m&&(n&&(z=Math.min(z,c)),t.style.width=z+"px");z=A.offsetWidth;x=A.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=z,u.mxCachedFinalOffsetHeight=x);x-=q;t.parentNode!=y&&(y.appendChild(t),t.style.visibility="")}else{A=document.createElement("div");A.style.cssText=t.getAttribute("style");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="absolute";A.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;A.appendChild(x);document.body.appendChild(A);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(z+=2,q+=2);if(k&&0<c){var v=x.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var H=A.style.whiteSpace;x.style.whiteSpace="nowrap";v<x.offsetWidth&&(A.style.whiteSpace=H)}n&&(v=Math.min(v,c));A.style.width=v+"px";
-z=x.offsetWidth+z+0;x=x.offsetHeight+q;A.style.display="inline-block";A.style.position="";A.style.visibility="";A.style.width=z+"px";t.setAttribute("style",A.style.cssText)}else z=x.offsetWidth+z,x=x.offsetHeight+q;A.parentNode.removeChild(A);y.appendChild(t)}n&&(x=Math.min(x,d),z=Math.min(z,c));"width"==m?d=x:"fill"!=m&&(c=z,d=x);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
-(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;A=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(A+="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!=p&&(A+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+A);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,k,l,m,n,p),null!=a&&(y.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(y),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
+Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events","all");t=this.createDiv(e,f,g,t,m);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(x);this.root.appendChild(u);var z,y;q=z=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
+document?(t.style.visibility="hidden",document.body.appendChild(t)):x.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==x&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(E=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<
+A.offsetWidth&&(t.style.whiteSpace=E));z=v+z-1;k&&"fill"!=m&&"width"!=m&&(n&&(z=Math.min(z,c)),t.style.width=z+"px");z=A.offsetWidth;y=A.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=z,u.mxCachedFinalOffsetHeight=y);y-=q;t.parentNode!=x&&(x.appendChild(t),t.style.visibility="")}else{A=document.createElement("div");A.style.cssText=t.getAttribute("style");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="absolute";A.style.visibility="hidden";y=document.createElement("div");
+y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.wordWrap=mxConstants.WORD_WRAP;y.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;A.appendChild(y);document.body.appendChild(A);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(z+=2,q+=2);if(k&&0<c){var v=y.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var E=A.style.whiteSpace;y.style.whiteSpace="nowrap";v<y.offsetWidth&&(A.style.whiteSpace=E)}n&&(v=Math.min(v,c));A.style.width=v+"px";
+z=y.offsetWidth+z+0;y=y.offsetHeight+q;A.style.display="inline-block";A.style.position="";A.style.visibility="";A.style.width=z+"px";t.setAttribute("style",A.style.cssText)}else z=y.offsetWidth+z,y=y.offsetHeight+q;A.parentNode.removeChild(A);x.appendChild(t)}n&&(y=Math.min(y,d),z=Math.min(z,c));"width"==m?d=y:"fill"!=m&&(c=z,d=y);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;A=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(A+="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!=p&&(A+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+A);x.setAttribute("width",
+Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
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,k,l,m,n,p){n=null!=n?n:0;k=this.state;var q=k.fontSize,r=this.createElement("g"),t=k.transform||"";this.updateFont(r);0!=n&&(t+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&r.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),mxClient.IS_CHROME_APP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"):(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&r.setAttribute("text-anchor",
@@ -561,23 +561,23 @@ 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,k,l,m,n,p,q){if(this.textEnabled&&null!=e){var r=this.state;if("html"==l){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"!=m&&g==mxConstants.ALIGN_TOP&&--b);l=8!=document.documentMode||mxClient.IS_EM?this.createElement("div"):this.createVmlElement("group");l.style.position="absolute";l.style.display="inline";l.style.left=
-this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=r.scale;var t=this.createElement("div");t.style.position="relative";t.style.display="inline";var u=mxUtils.getAlignmentAsPoint(f,g),y=u.x,u=u.y;e=this.createDiv(e,f,g,m);f=this.createElement("div");null!=q&&e.setAttribute("dir",q);if(k&&0<c){if(n||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var z=e;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&
+this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=r.scale;var t=this.createElement("div");t.style.position="relative";t.style.display="inline";var u=mxUtils.getAlignmentAsPoint(f,g),x=u.x,u=u.y;e=this.createDiv(e,f,g,m);f=this.createElement("div");null!=q&&e.setAttribute("dir",q);if(k&&0<c){if(n||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var z=e;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&
(z.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";p=r.rotation+(p||0);this.rotateHtml&&0!=p?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?l.appendChild(f):(t.appendChild(f),l.appendChild(t))):8!=document.documentMode||mxClient.IS_EM?(e.style.display="inline",l.appendChild(e)):(t.appendChild(e),l.appendChild(t));"DIV"!=this.root.nodeName?(q=this.createVmlElement("rect"),q.stroked="false",q.filled="false",
q.appendChild(l),this.root.appendChild(q)):this.root.appendChild(l);n?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==m?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==m&&(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!=p){z=Math.PI/180*p;p=parseFloat(parseFloat(Math.cos(z)).toFixed(8));
-q=parseFloat(parseFloat(Math.sin(-z)).toFixed(8));z%=2*Math.PI;0>z&&(z+=2*Math.PI);z%=Math.PI;z>Math.PI/2&&(z=Math.PI-z);g=Math.cos(z);var x=Math.sin(z);8!=document.documentMode||mxClient.IS_EM||(e.style.display="inline-block",f.style.display="inline-block",t.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);t=e;null!=t.firstChild&&"DIV"==t.firstChild.nodeName&&(t=t.firstChild);z=t.offsetWidth+3;t=t.offsetHeight;n?(c=Math.min(c,z),t=
-Math.min(t,d)):c=z;k&&(e.style.width=c+"px");mxClient.IS_QUIRKS&&(n||"width"==m)&&t>d&&(t=d,e.style.height=t+"px");d=t;n=(d-d*g+c*-x)/2-q*c*(y+.5)+p*d*(u+.5);k=(c-c*g+d*-x)/2+p*c*(y+.5)+q*d*(u+.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-c/2)*r.scale)+"px",m.style.top=this.format(b+(n-d/2)*r.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(r=8!=document.documentMode||
+q=parseFloat(parseFloat(Math.sin(-z)).toFixed(8));z%=2*Math.PI;0>z&&(z+=2*Math.PI);z%=Math.PI;z>Math.PI/2&&(z=Math.PI-z);g=Math.cos(z);var y=Math.sin(z);8!=document.documentMode||mxClient.IS_EM||(e.style.display="inline-block",f.style.display="inline-block",t.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);t=e;null!=t.firstChild&&"DIV"==t.firstChild.nodeName&&(t=t.firstChild);z=t.offsetWidth+3;t=t.offsetHeight;n?(c=Math.min(c,z),t=
+Math.min(t,d)):c=z;k&&(e.style.width=c+"px");mxClient.IS_QUIRKS&&(n||"width"==m)&&t>d&&(t=d,e.style.height=t+"px");d=t;n=(d-d*g+c*-y)/2-q*c*(x+.5)+p*d*(u+.5);k=(c-c*g+d*-y)/2+p*c*(x+.5)+q*d*(u+.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-c/2)*r.scale)+"px",m.style.top=this.format(b+(n-d/2)*r.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(r=8!=document.documentMode||
mxClient.IS_EM?r.scale:1,l.style.left=this.format(a+(k-c/2)*r)+"px",l.style.top=this.format(b+(n-d/2)*r)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+p+", M12="+q+", M21="+-q+", M22="+p+", 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&&(l.style.filter="alpha(opacity="+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,t=e.offsetHeight,mxClient.IS_QUIRKS&&n&&t>d&&(t=d,e.style.height=t+"px"),d=t,e.style.visibility="",r.appendChild(e),l.style.left=this.format(a+c*y*this.state.scale)+"px",l.style.top=this.format(b+d*u*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),t.style.left=100*y+"%",t.style.top=
+"top",1>this.state.alpha&&(l.style.filter="alpha(opacity="+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,t=e.offsetHeight,mxClient.IS_QUIRKS&&n&&t>d&&(t=d,e.style.height=t+"px"),d=t,e.style.visibility="",r.appendChild(e),l.style.left=this.format(a+c*x*this.state.scale)+"px",l.style.top=this.format(b+d*u*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),t.style.left=100*x+"%",t.style.top=
100*u+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,k,l,m,n,p,q)}};
mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p,q){k=this.state;a=(a+k.dx)*k.scale;b=(b+k.dy)*k.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.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=k.fontFamily;d.string=e;d.on="true";f=k.fontSize*k.scale/this.vmlScale;d.style.fontSize=f+"px";(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");k=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;f=e=0;
g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=Math.PI/180*p,e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-G)<z?(l=b-a.getCenterY(),z=Math.abs(b-G),c=!0):Math.abs(b-H)<z?(l=b-a.y,z=Math.abs(b-H),c=!0):Math.abs(b-E)<z&&(l=b-a.y-a.height,z=Math.abs(b-E),c=!0);c&&(r=C,t=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||c},e=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-v)<y?(k=b-a.getCenterX(),y=Math.abs(b-v),d=!0):Math.abs(b-x)<y?(k=b-a.x,y=Math.abs(b-x),d=!0):Math.abs(b-A)<y&&(k=b-a.x-a.width,y=Math.abs(b-A),d=!0);d&&(n=c,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||d},f=this.graph.getView().translate,g=this.graph.getView().scale,k=b.x,l=b.y,m=!1,n=null,p=null,q=!1,r=null,t=null,u=this.getGuideTolerance(),y=u,z=u,u=a.clone();u.x+=b.x;u.y+=b.y;var x=u.x,A=u.x+u.width,v=u.getCenterX(),H=u.y,E=u.y+u.height,G=u.getCenterY();for(b=0;b<this.states.length;b++){var C=this.states[b];null!=C&&(this.horizontal&&(e.call(this,C.getCenterX(),C),e.call(this,C.x,
-C),e.call(this,C.x+C.width,C)),this.vertical&&(d.call(this,C.getCenterY(),C),d.call(this,C.y,C),d.call(this,C.y+C.height,C)))}c&&(m||(c=a.x-(this.graph.snap(a.x/g-f.x)+f.x)*g,k=this.graph.snap(k/g)*g-c),q||(f=a.y-(this.graph.snap(a.y/g-f.y)+f.y)*g,l=this.graph.snap(l/g)*g-f));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-G)<z?(l=b-a.getCenterY(),z=Math.abs(b-G),c=!0):Math.abs(b-E)<z?(l=b-a.y,z=Math.abs(b-E),c=!0):Math.abs(b-H)<z&&(l=b-a.y-a.height,z=Math.abs(b-H),c=!0);c&&(r=D,t=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||c},e=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-v)<x?(k=b-a.getCenterX(),x=Math.abs(b-v),d=!0):Math.abs(b-y)<x?(k=b-a.x,x=Math.abs(b-y),d=!0):Math.abs(b-A)<x&&(k=b-a.x-a.width,x=Math.abs(b-A),d=!0);d&&(n=c,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||d},f=this.graph.getView().translate,g=this.graph.getView().scale,k=b.x,l=b.y,m=!1,n=null,p=null,q=!1,r=null,t=null,u=this.getGuideTolerance(),x=u,z=u,u=a.clone();u.x+=b.x;u.y+=b.y;var y=u.x,A=u.x+u.width,v=u.getCenterX(),E=u.y,H=u.y+u.height,G=u.getCenterY();for(b=0;b<this.states.length;b++){var D=this.states[b];null!=D&&(this.horizontal&&(e.call(this,D.getCenterX(),D),e.call(this,D.x,
+D),e.call(this,D.x+D.width,D)),this.vertical&&(d.call(this,D.getCenterY(),D),d.call(this,D.y,D),d.call(this,D.y+D.height,D)))}c&&(m||(c=a.x-(this.graph.snap(a.x/g-f.x)+f.x)*g,k=this.graph.snap(k/g)*g-c),q||(f=a.y-(this.graph.snap(a.y/g-f.y)+f.y)*g,l=this.graph.snap(l/g)*g-f));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
[new mxPoint(p,minY),new mxPoint(p,maxY)]:[new mxPoint(p,-this.graph.panDy),new mxPoint(p,g.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(n,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";q||null==this.guideY?null!=this.guideY&&(null!=r&&null!=a&&(minX=Math.min(a.x+k-this.graph.panDx,r.x),maxX=Math.max(a.x+a.width+k-this.graph.panDx,r.x+r.width)),this.guideY.points=null!=minX&&null!=maxX?[new mxPoint(minX,t),
new mxPoint(maxX,t)]:[new mxPoint(-this.graph.panDx,t),new mxPoint(g.scrollWidth-3-this.graph.panDx,t)],this.guideY.stroke=this.getGuideColor(r,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden";b=new mxPoint(k,l)}return b};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;
@@ -653,19 +653,19 @@ mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2,k=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,k=f.y-e.y,l=Math.sqrt(g*g+k*k),m=l-2*c-mxConstants.ARROW_SIZE,g=g/l,k=k/l,l=d*k/3,d=-d*g/3,n=e.x-l/2+c*g,e=e.y-d/2+c*k,p=n+l,q=e+d,r=p+m*g,m=q+m*k,t=r+l,u=m+d,y=t-3*l,z=u-3*d;a.begin();a.moveTo(n,e);a.lineTo(p,q);a.lineTo(r,m);a.lineTo(t,u);a.lineTo(f.x-c*g,f.y-c*k);a.lineTo(y,z);a.lineTo(y+l,z+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,k=f.y-e.y,l=Math.sqrt(g*g+k*k),m=l-2*c-mxConstants.ARROW_SIZE,g=g/l,k=k/l,l=d*k/3,d=-d*g/3,n=e.x-l/2+c*g,e=e.y-d/2+c*k,p=n+l,q=e+d,r=p+m*g,m=q+m*k,t=r+l,u=m+d,x=t-3*l,z=u-3*d;a.begin();a.moveTo(n,e);a.lineTo(p,q);a.lineTo(r,m);a.lineTo(t,u);a.lineTo(f.x-c*g,f.y-c*k);a.lineTo(x,z);a.lineTo(x+l,z+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(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),q=b[b.length-1],r=1;r<b.length-1&&b[r].x==
-b[0].x&&b[r].y==b[0].y;)r++;var t=b[r].x-b[0].x,r=b[r].y-b[0].y,u=Math.sqrt(t*t+r*r);if(0!=u){var y=t/u,z,x=y,A=r/u,v,H=A,u=f*A,E=-f*y,G=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();t=y;r=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,y,A,n,d,f,m,!0);else{z=b[0].x+u/2+m*y;v=b[0].y+E/2+m*A;var C=b[0].x-u/2+m*y,B=b[0].y-E/2+m*A;g?(a.moveTo(z,v),G.push(function(){a.lineTo(C,B)})):(a.moveTo(C,B),a.lineTo(z,v))}for(var F=v=z=0,u=0;u<b.length-2;u++)if(E=mxUtils.relativeCcw(b[u].x,
-b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),z=b[u+2].x-b[u+1].x,v=b[u+2].y-b[u+1].y,F=Math.sqrt(z*z+v*v),0!=F&&(x=z/F,H=v/F,tmp=Math.max(Math.sqrt((y*x+A*H+1)/2),.04),z=y+x,v=A+H,F=Math.sqrt(z*z+v*v),0!=F)){z/=F;v/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),F=0!=E&&p?Math.max(.1,F):Math.max(tmp,.06),I=b[u+1].x+v*f/2/F,N=b[u+1].y-z*f/2/F;v=b[u+1].x-v*f/2/F;z=b[u+1].y+z*f/2/F;0!=E&&p?-1==E?(E=v+H*f,F=z-x*f,a.lineTo(v+A*f,z-y*f),a.quadTo(I,N,E,F),function(b,c){G.push(function(){a.lineTo(b,
-c)})}(v,z)):(a.lineTo(I,N),function(b,c){var d=I-A*f,e=N+y*f,k=I-H*f,g=N+x*f;G.push(function(){a.quadTo(b,c,d,e)});G.push(function(){a.lineTo(k,g)})}(v,z)):(a.lineTo(I,N),function(b,c){G.push(function(){a.lineTo(b,c)})}(v,z));y=x;A=H}u=f*H;E=-f*x;if(l&&!g)this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*x+u/2,q.y-m*H+E/2);var M=q.x-m*x-u/2,U=q.y-m*H-E/2;g?(a.moveTo(M,U),G.splice(0,0,function(){a.moveTo(M,U)})):a.lineTo(M,U)}for(u=G.length-1;0<=u;u--)G[u]();g?(a.end(),a.stroke()):(a.close(),
-a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,t,r,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!0),a.stroke(),a.end()))}};
+b[0].x&&b[r].y==b[0].y;)r++;var t=b[r].x-b[0].x,r=b[r].y-b[0].y,u=Math.sqrt(t*t+r*r);if(0!=u){var x=t/u,z,y=x,A=r/u,v,E=A,u=f*A,H=-f*x,G=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();t=x;r=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,x,A,n,d,f,m,!0);else{z=b[0].x+u/2+m*x;v=b[0].y+H/2+m*A;var D=b[0].x-u/2+m*x,B=b[0].y-H/2+m*A;g?(a.moveTo(z,v),G.push(function(){a.lineTo(D,B)})):(a.moveTo(D,B),a.lineTo(z,v))}for(var F=v=z=0,u=0;u<b.length-2;u++)if(H=mxUtils.relativeCcw(b[u].x,
+b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),z=b[u+2].x-b[u+1].x,v=b[u+2].y-b[u+1].y,F=Math.sqrt(z*z+v*v),0!=F&&(y=z/F,E=v/F,tmp=Math.max(Math.sqrt((x*y+A*E+1)/2),.04),z=x+y,v=A+E,F=Math.sqrt(z*z+v*v),0!=F)){z/=F;v/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),F=0!=H&&p?Math.max(.1,F):Math.max(tmp,.06),I=b[u+1].x+v*f/2/F,N=b[u+1].y-z*f/2/F;v=b[u+1].x-v*f/2/F;z=b[u+1].y+z*f/2/F;0!=H&&p?-1==H?(H=v+E*f,F=z-y*f,a.lineTo(v+A*f,z-x*f),a.quadTo(I,N,H,F),function(b,c){G.push(function(){a.lineTo(b,
+c)})}(v,z)):(a.lineTo(I,N),function(b,c){var d=I-A*f,e=N+x*f,k=I-E*f,g=N+y*f;G.push(function(){a.quadTo(b,c,d,e)});G.push(function(){a.lineTo(k,g)})}(v,z)):(a.lineTo(I,N),function(b,c){G.push(function(){a.lineTo(b,c)})}(v,z));x=y;A=E}u=f*E;H=-f*y;if(l&&!g)this.paintMarker(a,q.x,q.y,-x,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*y+u/2,q.y-m*E+H/2);var L=q.x-m*y-u/2,U=q.y-m*E-H/2;g?(a.moveTo(L,U),G.splice(0,0,function(){a.moveTo(L,U)})):a.lineTo(L,U)}for(u=G.length-1;0<=u;u--)G[u]();g?(a.end(),a.stroke()):(a.close(),
+a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,t,r,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-x,-A,c,e,f,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+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,k,l,m,n,p,q,r,t,u,y,z,x,A,v){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!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
-this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=r?r:!0;this.background=t;this.border=u;this.wrap=null!=y?y:!1;this.clipped=null!=z?z:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=A?A:0;this.textDirection=v;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,k,l,m,n,p,q,r,t,u,x,z,y,A,v){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!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
+this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=r?r:!0;this.background=t;this.border=u;this.wrap=null!=x?x:!1;this.clipped=null!=z?z:!1;this.overflow=null!=y?y:"visible";this.labelPadding=null!=A?A:0;this.textDirection=v;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 k=mxUtils.isNode(this.value)||
@@ -756,7 +756,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 k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),k=1==mxUtils.getValue(k,
mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(l=k?Math.min(l,b.height):Math.min(l,b.width));c==k&&(e-=l);k?g+=l:f+=l}d.beginUpdate();try{for(var l=0,k=null,m=0,n=null,p=d.getChildCount(a),q=0;q<p;q++){var r=d.getChildAt(a,q);if(!this.isVertexIgnored(r)&&this.isVertexMovable(r)){var t=d.getGeometry(r);if(null!=t){t=t.clone();null!=this.wrap&&null!=k&&(c&&k.x+k.width+t.width+2*this.spacing>this.wrap||!c&&k.y+k.height+t.height+2*this.spacing>this.wrap)&&(k=null,c?g+=l+this.spacing:f+=l+this.spacing,l=0);
-var l=Math.max(l,c?t.height:t.width),u=0;if(!this.borderCollapse)var y=this.graph.getCellStyle(r),u=mxUtils.getNumber(y,mxConstants.STYLE_STROKEWIDTH,1);null!=k?c?t.x=m+this.spacing+Math.floor(u/2):t.y=m+this.spacing+Math.floor(u/2):this.keepFirstLocation||(c?t.x=f:t.y=g);c?t.y=g:t.x=f;this.fill&&null!=e&&(c?t.height=e:t.width=e);this.setChildGeometry(r,t);n=r;k=t;m=c?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+var l=Math.max(l,c?t.height:t.width),u=0;if(!this.borderCollapse)var x=this.graph.getCellStyle(r),u=mxUtils.getNumber(x,mxConstants.STYLE_STROKEWIDTH,1);null!=k?c?t.x=m+this.spacing+Math.floor(u/2):t.y=m+this.spacing+Math.floor(u/2):this.keepFirstLocation||(c?t.x=f:t.y=g);c?t.y=g:t.x=f;this.fill&&null!=e&&(c?t.height=e:t.width=e);this.setChildGeometry(r,t);n=r;k=t;m=c?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
b,k):this.resizeLast&&null!=b&&null!=k&&null!=n&&(c?k.width=b.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=b.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(n,k))}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};
@@ -859,9 +859,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.length;g++)k=f[g],k.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 k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(a,b){return a-b});f[l]=m}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;l=2*f-1;--f;e=[];for(g=0;g<l;++g)e[g]=0;for(g=0;g<d.length;g++)for(l=d[g]+f,++e[l];0<
l;)l%2&&(c+=e[l+1]),l=l-1>>1,++e[l];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],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,q=null,r,t,u=null,y=null,z,x=null,l=0;l<g.length-1;l++){if(0==l){z=k[l];m=z.getNextLayerConnectedCells(f);n=z.getPreviousLayerConnectedCells(f);r=[];t=[];for(var A=0;A<m.length;A++)r[A]=m[A].getGeneralPurposeVariable(f+1);for(A=
-0;A<n.length;A++)t[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,r=u,t=y,z=x;x=k[l+1];p=x.getNextLayerConnectedCells(f);q=x.getPreviousLayerConnectedCells(f);u=[];y=[];for(A=0;A<p.length;A++)u[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)y[A]=q[A].getGeneralPurposeVariable(f-1);for(var v=0,H=0,A=0;A<r.length;A++)for(var E=0;E<u.length;E++)r[A]>u[E]&&v++,r[A]<u[E]&&H++;for(A=0;A<t.length;A++)for(E=0;E<y.length;E++)t[A]>y[E]&&v++,t[A]<y[E]&&H++;if(H<v||H==v&&e)p=z.getGeneralPurposeVariable(f),
-z.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,p),p=m,q=n,u=r,y=t,x=z,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],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,q=null,r,t,u=null,x=null,z,y=null,l=0;l<g.length-1;l++){if(0==l){z=k[l];m=z.getNextLayerConnectedCells(f);n=z.getPreviousLayerConnectedCells(f);r=[];t=[];for(var A=0;A<m.length;A++)r[A]=m[A].getGeneralPurposeVariable(f+1);for(A=
+0;A<n.length;A++)t[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,r=u,t=x,z=y;y=k[l+1];p=y.getNextLayerConnectedCells(f);q=y.getPreviousLayerConnectedCells(f);u=[];x=[];for(A=0;A<p.length;A++)u[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)x[A]=q[A].getGeneralPurposeVariable(f-1);for(var v=0,E=0,A=0;A<r.length;A++)for(var H=0;H<u.length;H++)r[A]>u[H]&&v++,r[A]<u[H]&&E++;for(A=0;A<t.length;A++)for(H=0;H<x.length;H++)t[A]>x[H]&&v++,t[A]<x[H]&&E++;if(E<v||E==v&&e)p=z.getGeneralPurposeVariable(f),
+z.setGeneralPurposeVariable(f,y.getGeneralPurposeVariable(f)),y.setGeneralPurposeVariable(f,p),p=m,q=n,u=r,x=t,y=z,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],k=new MedianCellSorter;k.cell=g;var l;l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):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;
@@ -874,8 +874,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],k=new WeightedCellSorter(g,e);k.rankIndex=f;k.visited=!0;b.push(k);c.put(g,k)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,l=g.weightedValue,m=parseInt(g.rankIndex),k=e.getNextLayerConnectedCells(l),n=e.getPreviousLayerConnectedCells(l),p=k.length,q=n.length,r=this.medianXValue(k,l+1),t=this.medianXValue(n,
-l-1),u=p+q,y=e.getGeneralPurposeVariable(l),z=y;0<u&&(z=(r*p+t*q)/u);p=!1;z<y-1?0==m?(e.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m-1],y=m.getGeneralPurposeVariable(l),y=y+m.width/2+this.intraCellSpacing+e.width/2,y<z?(e.setGeneralPurposeVariable(l,z),p=!0):y<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,y),p=!0)):z>y+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m+1],y=m.getGeneralPurposeVariable(l),y=y-m.width/2-this.intraCellSpacing-e.width/2,y>z?(e.setGeneralPurposeVariable(l,
-z),p=!0):y>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,y),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l))}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)};
+l-1),u=p+q,x=e.getGeneralPurposeVariable(l),z=x;0<u&&(z=(r*p+t*q)/u);p=!1;z<x-1?0==m?(e.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m-1],x=m.getGeneralPurposeVariable(l),x=x+m.width/2+this.intraCellSpacing+e.width/2,x<z?(e.setGeneralPurposeVariable(l,z),p=!0):x<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,x),p=!0)):z>x+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m+1],x=m.getGeneralPurposeVariable(l),x=x-m.width/2-this.intraCellSpacing-e.width/2,x>z?(e.setGeneralPurposeVariable(l,
+z),p=!0):x>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,x),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l))}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 k;k=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var l,g=d[f].cell;l=0;k=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
null!=k&&(l=k.length,l=0<l?this.medianXValue(k,c):g.getGeneralPurposeVariable(a));var m=0;k=-1E8;for(var n=d[f].rankIndex-1;0<=n;){var p=e[b[n].id];if(null!=p){var q=p.cell;p.visited?(k=q.getGeneralPurposeVariable(a)+q.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=q.width+this.intraCellSpacing,n--)}}m=0;q=1E8;for(n=d[f].rankIndex+1;n<d.length;)if(p=e[b[n].id],null!=p){var r=p.cell;p.visited?(q=r.getGeneralPurposeVariable(a)-r.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=r.width+
this.intraCellSpacing,n++)}l>=k&&l<=q?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>q&&(g.setGeneralPurposeVariable(a,q),this.currentXDelta+=l-q);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};
@@ -895,10 +895,10 @@ mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a
t;if(r.isVertex()){t=0==k?e.connectsAsSource:e.connectsAsTarget;for(var u=0;u<t.length;u++)if(t[u].source==r||t[u].target==r)f+=t[u].edges.length,q++,g.push(t[u])}else f+=r.edges.length,q++,g.push(r)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/f;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=0;m<g.length;m++)for(q=g[m].edges.length,r=this.jettyPositions[g[m].ids[0]],null==r&&(r=[],this.jettyPositions[g[m].ids[0]]=r),m<f/2?
p+=this.prefVertEdgeOff:m>f/2&&(p-=this.prefVertEdgeOff),t=0;t<q;t++)r[4*t+2*k]=n,n+=l,r[4*t+2*k+1]=p}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,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),q=[],r=a.isReversed;p!=g&&(r=!r);if(null!=f){var t=r?
-2:0,u=r?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],y=f[4*e+1+t];r!=l&&(y=-y);var u=u+y,t=f[4*e+t],z=k.model.getTerminal(n,!0);this.layout.isPort(z)&&k.model.getParent(z)==p&&(t=k.view.getState(z),t=null!=t?t.x:p.geometry.x+a.source.width*z.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(t,u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(t,u+y))):(q.push(new mxPoint(u,
-t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u+y,t)))}t=a.x.length-1;u=y=-1;p=a.maxRank-1;for(r&&(t=0,y=a.x.length,u=1,p=a.minRank+1);a.maxRank!=a.minRank&&t!=y;t+=u){var z=a.x[t]+b,x=(this.rankTopY[p]+this.rankBottomY[p+1])/2,A=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(r)var v=x,x=A,A=v;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(z,x)),q.push(new mxPoint(z,A))):(q.push(new mxPoint(x,z)),q.push(new mxPoint(A,
-z)));this.limitX=Math.max(this.limitX,z);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],y=f[4*e+3-t],r!=l&&(y=-y),u-=y,t=f[4*e+2-t],r=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(r)&&k.model.getParent(r)==p&&(t=k.view.getState(r),t=null!=t?t.x:p.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
-q.push(new mxPoint(t,u-y)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-y,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
+2:0,u=r?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],x=f[4*e+1+t];r!=l&&(x=-x);var u=u+x,t=f[4*e+t],z=k.model.getTerminal(n,!0);this.layout.isPort(z)&&k.model.getParent(z)==p&&(t=k.view.getState(z),t=null!=t?t.x:p.geometry.x+a.source.width*z.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(t,u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(t,u+x))):(q.push(new mxPoint(u,
+t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u+x,t)))}t=a.x.length-1;u=x=-1;p=a.maxRank-1;for(r&&(t=0,x=a.x.length,u=1,p=a.minRank+1);a.maxRank!=a.minRank&&t!=x;t+=u){var z=a.x[t]+b,y=(this.rankTopY[p]+this.rankBottomY[p+1])/2,A=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(r)var v=y,y=A,A=v;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(z,y)),q.push(new mxPoint(z,A))):(q.push(new mxPoint(y,z)),q.push(new mxPoint(A,
+z)));this.limitX=Math.max(this.limitX,z);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],x=f[4*e+3-t],r!=l&&(x=-x),u-=x,t=f[4*e+2-t],r=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(r)&&k.model.getParent(r)==p&&(t=k.view.getState(r),t=null!=t?t.x:p.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+q.push(new mxPoint(t,u-x)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-x,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);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;
@@ -1019,10 +1019,10 @@ mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.targetWindow=null;mxP
mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--\x3e');return a};mxPrintPreview.prototype.appendGraph=function(a,b,c,d,e,f){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.x0=c;this.y0=d;this.open(null,null,e,f)};
mxPrintPreview.prototype.open=function(a,b,c,d){var e=this.graph.cellRenderer.initializeOverlay,f=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(a,b,c,d){b.dialect=a.view.graph.dialect;b.init(a.view.getDrawPane())});this.wnd=null!=b?b:this.wnd;var g=!1;null==this.wnd&&(g=!0,this.wnd=window.open());var k=this.wnd.document;if(g){var l=this.getDoctype();null!=l&&0<l.length&&
k.writeln(l);mxClient.IS_VML?k.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):("CSS1Compat"===document.compatMode&&k.writeln("<!DOCTYPE html>"),k.writeln("<html>"));k.writeln("<head>");this.writeHead(k,a);k.writeln("</head>");k.writeln('<body class="mxPage">')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-=
-q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),y=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*y;var z=mxUtils.bind(this,function(){if(this.pageSelector&&(1<y||1<u)){var a=this.createPageSelector(y,u);k.body.appendChild(a);if(mxClient.IS_IE&&null==k.documentMode||
-5==k.documentMode||8==k.documentMode||7==k.documentMode){a.style.position="absolute";var b=function(){a.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),x=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;if(c||b)a.style.pageBreakAfter=
-"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),k.body.appendChild(a));(c||b)&&this.addPageBreak(k)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var v=0;v<A.length;v++)x(A[v],!0);for(var H=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<y;v++){var E=v*t/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<u;a++){if(null==this.wnd)return null;
-var G=a*r/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,C=v*u+a+1,B=new mxRectangle(G,E,r,t),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-G,-E,this.scale,C,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-G,-E)}),C);f.setAttribute("id","mxPage-"+C);x(f,null!=H||v<y-1||a<u-1)}}if(null!=H)for(v=0;v<H.length;v++)x(H[v],v<H.length-1);g&&!d&&(this.closeDocument(),z());this.wnd.focus()}catch(F){null!=f&&null!=f.parentNode&&
+q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),x=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*x;var z=mxUtils.bind(this,function(){if(this.pageSelector&&(1<x||1<u)){var a=this.createPageSelector(x,u);k.body.appendChild(a);if(mxClient.IS_IE&&null==k.documentMode||
+5==k.documentMode||8==k.documentMode||7==k.documentMode){a.style.position="absolute";var b=function(){a.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),y=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;if(c||b)a.style.pageBreakAfter=
+"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),k.body.appendChild(a));(c||b)&&this.addPageBreak(k)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var v=0;v<A.length;v++)y(A[v],!0);for(var E=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<x;v++){var H=v*t/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<u;a++){if(null==this.wnd)return null;
+var G=a*r/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,D=v*u+a+1,B=new mxRectangle(G,H,r,t),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-G,-H,this.scale,D,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-G,-H)}),D);f.setAttribute("id","mxPage-"+D);y(f,null!=E||v<x-1||a<u-1)}}if(null!=E)for(v=0;v<E.length;v++)y(E[v],v<E.length-1);g&&!d&&(this.closeDocument(),z());this.wnd.focus()}catch(F){null!=f&&null!=f.parentNode&&
f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("</body>");a.writeln("</html>");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1033,7 +1033,7 @@ mxPrintPreview.prototype.renderPage=function(a,b,c,d,e,f){f=this.wnd.document;va
b-2*this.border+"px",l.style.overflow="hidden",!mxClient.IS_IE||null!=f.documentMode&&5!=f.documentMode&&8!=f.documentMode&&7!=f.documentMode?(l.style.top=this.border+"px",l.style.left=this.border+"px"):(l.style.marginTop=this.border+"px",l.style.marginLeft=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(l.style.position="absolute"),g.appendChild(l),document.body.appendChild(g),k=l}catch(n){throw g.parentNode.removeChild(g),n;}e(k);return g};
mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e,f){var g=this.graph.getView();d=this.graph.container;this.graph.container=e;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var r=g.getTranslate();g.translate=new mxPoint(a,
-b);var t=this.graph.cellRenderer.redraw,u=g.states;a=g.scale;if(this.clipping){var y=new mxRectangle((f.x+r.x)*a,(f.y+r.y)*a,f.width*a/c,f.height*a/c);this.graph.cellRenderer.redraw=function(a,b,c){if(null!=a){var d=u.get(a.cell);if(null!=d&&(d=g.getBoundingBox(d,!1),null!=d&&!mxUtils.intersects(y,d)))return}t.apply(this,arguments)}}a=null;try{var z=[this.getRoot()];a=new mxTemporaryCellStates(g,c,z)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
+b);var t=this.graph.cellRenderer.redraw,u=g.states;a=g.scale;if(this.clipping){var x=new mxRectangle((f.x+r.x)*a,(f.y+r.y)*a,f.width*a/c,f.height*a/c);this.graph.cellRenderer.redraw=function(a,b,c){if(null!=a){var d=u.get(a.cell);if(null!=d&&(d=g.getBoundingBox(d,!1),null!=d&&!mxUtils.intersects(x,d)))return}t.apply(this,arguments)}}a=null;try{var z=[this.getRoot()];a=new mxTemporaryCellStates(g,c,z)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)z=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position="relative",c.style.top=this.marginTop+"px",c.setAttribute("width",f.width),c.setAttribute("height",f.height),c.style.width="",c.style.height=""):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=z;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),
0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(q);this.graph.container=d;this.graph.cellRenderer.redraw=t;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=r;a.destroy();g.setEventsEnabled(p)}};
mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
@@ -1149,23 +1149,23 @@ b.x=k.x,b.y=k.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,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=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),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,k)||mxUtils.contains(b,d.x,k)||e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,k)))))},
SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,m=!0,n=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var q=g.length-1;if(null!=d&&0<d.length){for(var n=[],r=0;r<d.length;r++){var t=a.view.transformControlPoint(a,d[r]);null!=t&&(t.x=
-Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,y=g[0],z=!1,x=!1,z=n;null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);for(r=0;2>r;r++){var A=null!=y&&y.x==z.x,v=null!=y&&y.y==z.y,H=null!=u&&z.y>=u.y&&z.y<=u.y+
-u.height,u=null!=u&&z.x>=u.x&&z.x<=u.x+u.width,z=v||null==y&&H,x=A||null==y&&u;if(0!=r||!(z&&x||A&&v)){if(null!=y&&!v&&!A&&(H||u)){m=H?!1:!0;break}if(x||z){m=z;1==r&&(m=0==d.length%2?z:x);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);z=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
+Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,x=g[0],z=!1,y=!1,z=n;null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),u=null);for(r=0;2>r;r++){var A=null!=x&&x.x==z.x,v=null!=x&&x.y==z.y,E=null!=u&&z.y>=u.y&&z.y<=u.y+
+u.height,u=null!=u&&z.x>=u.x&&z.x<=u.x+u.width,z=v||null==x&&E,y=A||null==x&&u;if(0!=r||!(z&&y||A&&v)){if(null!=x&&!v&&!A&&(E||u)){m=E?!1:!0;break}if(y||z){m=z;1==r&&(m=0==d.length%2?z:y);break}}u=c;x=g[q];null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),u=null);z=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
p.y));m?p.y=n.y:p.x=n.x;for(r=0;r<d.length;r++)m=!m,n=d[r],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[q];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[q]&&g[q].y!=n.y||null==g[q]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.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[q]&&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!=t&&null!=e[e.length-1]&&Math.abs(t.x-e[e.length-1].x)<k&&Math.abs(t.y-e[e.length-1].y)<k&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-t.x)<k&&(e[e.length-1].x=t.x),Math.abs(e[e.length-1].y-t.y)<k&&(e[e.length-1].y=t.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),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,q=null!=b?b.width:0,r=null!=b?b.height:0,t=null!=c?c.x:m.x,u=null!=c?c.y:m.y,y=null!=c?c.width:0,z=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 A=x+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,H=m.y-l.y,v=v*v+H*H<A*A;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)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),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
-q=v.width,r=v.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(t,u,y,z),v),t=v.x,u=v.y,y=v.width,z=v.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;r=Math.round(10*r)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;y=Math.round(10*y)/10;z=Math.round(10*z)/10;a=[0,0];n=[[n,p,q,r],[t,u,y,z]];x=[f,x];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=
-n[v][0]-x[v],mxEdgeStyle.limits[v][2]=n[v][1]-x[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+x[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+x[v];x=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);H=x-p;x=0;0>v?x=0>H?2:1:0>=H&&(x=3,0==v&&(x=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
+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),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,q=null!=b?b.width:0,r=null!=b?b.height:0,t=null!=c?c.x:m.x,u=null!=c?c.y:m.y,x=null!=c?c.width:0,z=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),y=a.view.scale*mxEdgeStyle.getJettySize(a,
+b,c,d,!1);null!=b&&c==b&&(f=y=Math.max(f,y));var A=y+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,E=m.y-l.y,v=v*v+E*E<A*A;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)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),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
+q=v.width,r=v.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(t,u,x,z),v),t=v.x,u=v.y,x=v.width,z=v.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;r=Math.round(10*r)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;x=Math.round(10*x)/10;z=Math.round(10*z)/10;a=[0,0];n=[[n,p,q,r],[t,u,x,z]];y=[f,y];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=
+n[v][0]-y[v],mxEdgeStyle.limits[v][2]=n[v][1]-y[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+y[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+y[v];y=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);E=y-p;y=0;0>v?y=0>E?2:1:0>=E&&(y=3,0==v&&(y=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
b[v][1]=(p.y-n[v][1])/n[v][3],1>=Math.abs(p.y-n[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[v][1]-n[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);v=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-A,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-A,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-A,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-A,0);A=[];
c=[];l=[];c[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=v>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=v>=p?v:p;q=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(l[v]&d[v])&&(l[v]=mxUtils.reversePortConstraints(l[v])),q[v][0]=l[v],q[v][1]=c[v]);0<p&&0<m&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
c[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=c[1],r=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=c[1],q[1][1]=l[1],r=!0));0<p&&!r&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=l[1],q[1][1]=c[1],r=!0);0<m&&!r&&(q[0][0]=c[0],q[0][1]=l[0],q[1][0]=c[1],q[1][1]=l[1]);for(v=0;2>v;v++)0==a[v]&&(0==(q[v][0]&d[v])&&(q[v][0]=q[v][1]),A[v]=q[v][0]&d[v],A[v]|=(q[v][1]&d[v])<<8,A[v]|=(q[1-v][v]&d[v])<<16,A[v]|=(q[1-v][1-v]&d[v])<<24,0==(A[v]&15)&&(A[v]<<=8),0==(A[v]&3840)&&(A[v]=A[v]&15|A[v]>>8),0==(A[v]&
-983040)&&(A[v]=A[v]&65535|(A[v]&251658240)>>8),a[v]=A[v]&15,d[v]==mxConstants.DIRECTION_MASK_WEST||d[v]==mxConstants.DIRECTION_MASK_NORTH||d[v]==mxConstants.DIRECTION_MASK_EAST||d[v]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[v]=d[v]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];A=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;A-=x;1>d&&(d+=4);1>A&&(A+=4);d=mxEdgeStyle.routePatterns[d-1][A-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+983040)&&(A[v]=A[v]&65535|(A[v]&251658240)>>8),a[v]=A[v]&15,d[v]==mxConstants.DIRECTION_MASK_WEST||d[v]==mxConstants.DIRECTION_MASK_NORTH||d[v]==mxConstants.DIRECTION_MASK_EAST||d[v]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[v]=d[v]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];A=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=y;A-=y;1>d&&(d+=4);1>A&&(A+=4);d=mxEdgeStyle.routePatterns[d-1][A-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=A=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(v=0;v<d.length;v++)l=d[v]&15,r=l==mxConstants.DIRECTION_MASK_EAST?3:l,r+=x,4<r&&(r-=4),m=mxEdgeStyle.dirVectors[r-1],l=0<r%2?0:1,l!=A&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[v]&mxEdgeStyle.TARGET_MASK),u=0<(d[v]&mxEdgeStyle.SOURCE_MASK),p=(d[v]&mxEdgeStyle.SIDE_MASK)>>5,p<<=x,15<p&&(p>>=4),q=0<(d[v]&mxEdgeStyle.CENTER_MASK),(u||t)&&9>p?(r=u?0:1,p=q&&0==l?n[r][0]+b[r][0]*n[r][2]:q?n[r][1]+b[r][1]*
+0:1;for(v=0;v<d.length;v++)l=d[v]&15,r=l==mxConstants.DIRECTION_MASK_EAST?3:l,r+=y,4<r&&(r-=4),m=mxEdgeStyle.dirVectors[r-1],l=0<r%2?0:1,l!=A&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[v]&mxEdgeStyle.TARGET_MASK),u=0<(d[v]&mxEdgeStyle.SOURCE_MASK),p=(d[v]&mxEdgeStyle.SIDE_MASK)>>5,p<<=y,15<p&&(p>>=4),q=0<(d[v]&mxEdgeStyle.CENTER_MASK),(u||t)&&9>p?(r=u?0:1,p=q&&0==l?n[r][0]+b[r][0]*n[r][2]:q?n[r][1]+b[r][1]*
n[r][3]:mxEdgeStyle.limits[r][p],0==l?(p=(p-mxEdgeStyle.wayPoints1[f][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*p)):(p=(p-mxEdgeStyle.wayPoints1[f][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*p))):q&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:A=l;for(v=0;v<=f&&(v!=f||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)==(f+1)%2);v++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[v][0]),Math.round(mxEdgeStyle.wayPoints1[v][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);
@@ -1318,7 +1318,7 @@ n=this.view.getState(this.model.getParent(a[f]));if(null!=m&&null!=n)if(c=n.orig
l.length;m++)l[m].x+=c,l[m].y+=n}else l.translate(c,n)}}else d=[]}return d};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,k,l){b=this.createVertex(a,b,c,d,e,f,g,k,l);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,k,l){a=new mxGeometry(d,e,f,g);a.relative=null!=l?l:!1;c=new mxCell(c,a,k);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,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var q=this.view.getState(p),r=null!=q?q.origin:n,t=this.model.getGeometry(a[l]);if(null!=t){var u=r.x-m.x,y=r.y-m.y,t=t.clone();t.translate(u,y);t.relative||!this.model.isVertex(a[l])||this.isAllowNegativeCoordinates()||
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var q=this.view.getState(p),r=null!=q?q.origin:n,t=this.model.getGeometry(a[l]);if(null!=t){var u=r.x-m.x,x=r.y-m.y,t=t.clone();t.translate(u,x);t.relative||!this.model.isVertex(a[l])||this.isAllowNegativeCoordinates()||
(t.x=Math.max(0,t.x),t.y=Math.max(0,t.y));this.model.setGeometry(a[l],t)}}b==p&&c+l>this.model.getChildCount(b)&&c--;this.model.add(b,a[l],c+l);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[l],!0);(null==k||k)&&this.isExtendParentsOnAdd(a[l])&&this.isExtendParent(a[l])&&this.extendParent(a[l]);(null==g||g)&&this.constrainChild(a[l]);null!=d&&this.cellConnected(a[l],d,!0);null!=e&&this.cellConnected(a[l],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};
@@ -1638,7 +1638,7 @@ mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreat
l.x-=k.origin.x;l.y-=k.origin.y}}this.graph.addCell(b,d)}var m=this.graph.getDefaultParent();null!=a&&null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot()&&(m=e.getParent(a),null!=a.geometry&&a.geometry.relative&&null!=b.geometry&&b.geometry.relative&&(m=e.getParent(m)));var n=k=null;null!=this.edgeState&&(k=this.edgeState.cell.value,n=this.edgeState.cell.style);g=this.insertEdge(m,null,k,a,b,n);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)){m=null;for(l=a;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=g.parent;)l=this.graph.model.getParent(l);null!=l&&null!=l.parent&&l.parent==g.parent&&(m=l.parent.getIndex(l),l.parent.insert(g,m))}var p=e.getGeometry(g);null==p&&(p=new mxGeometry,p.relative=!0,e.setGeometry(g,p));if(null!=
this.waypoints&&0<this.waypoints.length){var q=this.graph.view.scale,r=this.graph.view.translate;p.points=[];for(a=0;a<this.waypoints.length;a++){var t=this.waypoints[a];p.points.push(new mxPoint(t.x/q-r.x,t.y/q-r.y))}}if(null==b){var u=this.graph.view.translate,q=this.graph.view.scale,t=null!=this.originalPoint?new mxPoint(this.originalPoint.x/q-u.x,this.originalPoint.y/q-u.y):new mxPoint(this.currentPoint.x/q-u.x,this.currentPoint.y/q-u.y);t.x-=this.graph.panDx/this.graph.view.scale;t.y-=this.graph.panDy/
-this.graph.view.scale;p.setTerminalPoint(t,!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;p.setTerminalPoint(t,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(x){mxLog.show(),mxLog.debug(x.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 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 k=this.graph.view.getState(b);if(null!=k){var l=k.x/f-e.x,e=k.y/f-e.y;Math.abs(l-c.x)<=g&&(c.x=Math.round(l));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};
@@ -1973,8 +1973,8 @@ g={});for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var b=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(b,f,g)}c=c.nextSibling}return d};return a}());
var mxDefaultToolbarCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var b=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||
f,g=c.getAttribute("icon"),k=c.getAttribute("pressedIcon"),l=c.getAttribute("action"),m=c.getAttribute("mode"),n=c.getAttribute("template"),p="0"!=c.getAttribute("toggle"),q=mxUtils.getTextContent(c),r=null;if(null!=l)r=d.addItem(f,g,l,k);else if(null!=m)var t=mxDefaultToolbarCodec.allowEval?mxUtils.eval(q):null,r=d.addMode(f,g,m,k,t);else if(null!=n||null!=q&&0<q.length)r=b.templates[n],n=c.getAttribute("style"),null!=r&&null!=n&&(r=b.graph.cloneCells([r])[0],r.setStyle(n)),n=null,null!=q&&0<q.length&&
-mxDefaultToolbarCodec.allowEval&&(n=mxUtils.eval(q)),r=d.addPrototype(f,g,r,k,n,p);else if(k=mxUtils.getChildNodes(c),0<k.length)if(null==g)for(n=d.addActionCombo(f),f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(n,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(n,g,p));else{var u=null,y=d.addPrototype(f,g,function(){var a=b.templates[u.value];if(null!=a){var a=a.clone(),c=u.options[u.selectedIndex].cellStyle;null!=c&&a.setStyle(c);return a}mxLog.warn("Template "+
-a+" not found");return null},null,null,p),u=d.addCombo();mxEvent.addListener(u,"change",function(){d.toolbar.selectMode(y,function(a){a=mxUtils.convertPoint(b.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return b.addVertex(null,t(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(u,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),q=p.getAttribute("template"),d.addOption(u,g,q||n).cellStyle=p.getAttribute("style"))}null!=r&&(n=c.getAttribute("id"),
+mxDefaultToolbarCodec.allowEval&&(n=mxUtils.eval(q)),r=d.addPrototype(f,g,r,k,n,p);else if(k=mxUtils.getChildNodes(c),0<k.length)if(null==g)for(n=d.addActionCombo(f),f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(n,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(n,g,p));else{var u=null,x=d.addPrototype(f,g,function(){var a=b.templates[u.value];if(null!=a){var a=a.clone(),c=u.options[u.selectedIndex].cellStyle;null!=c&&a.setStyle(c);return a}mxLog.warn("Template "+
+a+" not found");return null},null,null,p),u=d.addCombo();mxEvent.addListener(u,"change",function(){d.toolbar.selectMode(x,function(a){a=mxUtils.convertPoint(b.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return b.addVertex(null,t(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(u,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),q=p.getAttribute("template"),d.addOption(u,g,q||n).cellStyle=p.getAttribute("style"))}null!=r&&(n=c.getAttribute("id"),
null!=n&&0<n.length&&r.setAttribute("id",n))}c=c.nextSibling}}return d};return a}());mxDefaultToolbarCodec.allowEval=!0;mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var b=c.getElementsByTagName("include")[0];null!=b?this.processInclude(a,b,d):null!=d&&(d.config=c);return d};return a}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
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");
@@ -1992,6 +1992,7 @@ Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYA
Editor.zoomOutLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABJklEQVQ4y4WT2XaDMAxEvWD2nSSUNEnTJN3r//+9Sj7ILAY6L0ijC4ONYVZRpo6cByrz2YKSUGorGTpz71lPVHvT+avoB5wIkU/mxk8veceSuNoLg44IzziXjvpih72wKQnm8yc2UoiP/LAd8jQfe2Xf4Pq+2EyYIvv9wbzHHCgwxDdlBtWZOdqDfTCVgqpygQpsZaojVAVc9UjQxnAJDIBhiQv84tq3gMQCAVTxVoSibXJf8tMuc7e1TB/DCmejBNg/w1Y3c+AM5vv4w7xM59/oXamrHaLVqPQ+OTCnmMZxgz0SdL5zji0/ld6j88qGa5KIiBB6WeJGKfUKwSMKLuXgvl1TW0tm5R9UQL/efSDYsnzxD8CinhBsTTdugJatKpJwf8v+ADb8QmvW7AeAAAAAAElFTkSuQmCC";
Editor.zoomInLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABKElEQVQ4y4WT6WKCMBCENwkBwn2oFKvWqr3L+79es4EkQIDOH2d3Pxk2ABiJlB8JCXjqw4LikHVGLHTm3nM3UeVN5690GBBN0GwyV/3kkrUQR+WeKnREeKpzaXWd77CmJiXGfPIEI4V4yQ9TIW/ntlcMBe731Vts9w5TWG8F5j3mQI4hvrKpdGeYA7CX9qAcl650gVJartxRuhyHVghF8idQAIbFLvCLu28BsQEC6aKtCK6Pyb3JT7PmbmtNH8Ny56CotD/2qOs5cJbuffxgXmCib+xddVU5RNOhkvvkhTlFehzVWCOh3++MYElOhfdovaImnRYVmqDdsuhNp1QrBBE6uGC2+3ZNjGdg5B94oD+9uyVgWT79BwAxEBTWdOu3bWBVgsn/N/AHUD9IC01Oe40AAAAASUVORK5CYII=";
Editor.actualSizeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABIUlEQVQ4y4WT2XqDIBCFBxDc9yTWNEnTJN3r+79eGT4BEbXnaubMr8dBBaM450dCQp4LWFAascGIRd48eB4cNYE7f6XjgGiCFs5c+dml6CFN6j1V6IQIlHPpdV/usKcmJcV88gQTRXjLD9Mhb+fWq8YG9/uCmTCFjeeDeY85UGKIUGUuqzN42kv7oCouq9oHamlzVR1lVfpAIu1QVRiW+sAv7r4FpAYIZZVsRXB9TP5Dfpo1d1trCgzz1iiptH/sUbdz4CzN9+mLeXHn3+hdddd4RDegsrvzwZwSs2GLPRJidAqCLTlVwaMPqpYMWjTWBB2WRW86pVkhSKyDK2bdt2tmagZG4sBD/evdLQHLEvQfAOKRoLCmG1FAB6uKmby+gz+REDn7O5+EwQAAAABJRU5ErkJggg==";
+Editor.printLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAXVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9RKvvlAAAAHnRSTlMAydnl77qbMLT093H7K4Nd4Ktn082+lYt5bkklEgP44nQSAAAApUlEQVQ4y73P2Q6DIBRF0cOgbRHHzhP//5m9mBAQKjG1cT0Yc7ITAMu1LNQgUZiQ2DYoNQ0sCQb6qgHAfRx48opq3J9AZ6xuF7uOew8Ik1OsCZRS2UAC9V+D9a+QZYxNA45YFQftPtSkATOhw7dAc0vPBwKWiIOjP0JZ0yMuQJ27g36DipOUsqRAM0dR8KD1/ILHaHSE/w8DIx09E3g/BTce6rHUB5sAPKvfF+JdAAAAAElFTkSuQmCC";
Editor.layersLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAmVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v7///+bnZkkAAAAMnRSTlMABPr8ByiD88KsTi/rvJb272mjeUA1CuPe1M/KjVxYHxMP6KZ0S9nYzGRGGRaznpGIbzaGUf0AAAHESURBVDjLbZLZYoIwEEVDgLCjbKIgAlqXqt3m/z+uNwu1rcyDhjl3ktnYL7OY254C0VX3yWFZfzDrOClbbgKxi0YDHjwl4jbnRkXxJS/C1YP3DbBhD1n7Ex4uaAqdVDb3yJ/4J/3nJD2to/ngQz/DfUvzMp4JJ5sSCaF5oXmemgQDfDxzbi+Kq4sU+vNcuAmx94JtyOP2DD4Epz2asWSCz4Z/4fECxyNj9zC9xNLHcdPEO+awDKeSaUu0W4twZQiO2hYVisTR3RCtK/c1X6t4xMEpiGqXqVntEBLolkZZsKY4QtwH6jzq67dEHlJysB1aNOD3XT7n1UkasQN59L4yC2RELMDSeCRtz3yV22Ub3ozIUTknYx8JWqDdQxbUes98cR2kZtUSveF/bAhcedwEWmlxIkpZUy4XOCb6VBjjxHvbwo/1lBAHHi2JCr0NI570QhyHq/DhJoE2lLgyA4RVe6KmZ47O/3b86MCP0HWa73A8/C3SUc5Qc1ajt6fgpXJ+RGpMvDSchepZDOOQRcZVIKcK90x2D7etqtI+56+u6n3sPriO6nfphitR4+O2m3EbM7lh3me1FM1o+LMI887rN+s3/wZdTFlpNVJiOAAAAABJRU5ErkJggg==";
Editor.closeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAUVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////8IN+deAAAAGnRSTlMAuvAIg/dDM/QlOeuFhj0S5s4vKgzjxJRQNiLSey0AAADNSURBVDjLfZLbEoMgDEQjRRRs1XqX///QNmOHJSnjPkHOGR7IEmeoGtJZstnwjqbRfIsmgEdtPCqe9Ynz7ZSc07rE2QiSc+qv8TvjRXA2PDUm3dpe82iJhOEUfxJJo3aCv+jKmRmH4lcCjCjeh9GWOdL/GZZkXH3PYYDrHBnfc4D/RVZf5sjoC1was+Y6HQxwaUxFvq/a0Pv343VCTxfBSRiB+ab3M3eiQZXmMNBJ3Y8pGRZtYQ7DgHMXJEdPLTaN/qBjzJOBc3nmNcbsA16bMR0oLqf+AAAAAElFTkSuQmCC";
Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAgMAAAAOFJJnAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAgJsrThgAAABcSURBVBjThc6xDcAgDATAd8MQTEPW8TRUmYCGnzLRYyOlIV+dZFtvkICTFGqiJEzAG0/Uje9oL+e5Vu4F5yUYJxxqGKhQZ0eBvmgwYQLQaARKD1hbiPyDR0QOeAC31EyNe5X/kAAAAABJRU5ErkJggg==";Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFZJREFUOMvdkskRgDAMA4lDwg2B7b9XOlge/KKvdsa25KFb5XlRvxXC/DNBEv8IFNjBgGdDgXtFgTyhwDXiQAUHCvwa4Uv6mR6UR+1led2mVonvl+tML45qCQNQLIx7AAAAAElFTkSuQmCC";
@@ -2013,6 +2014,43 @@ a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.backg
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,c){b.undoableEditHappened(c.getProperty("edit"))};var c=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,c);a.getView().addListener(mxEvent.UNDO,c);c=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),e=a.getModel(),k=[],l=0;l<d.length;l++)(e.isVertex(d[l])||e.isEdge(d[l]))&&null!=a.view.getState(d[l])&&
k.push(d[l]);a.setSelectionCells(k)};b.addListener(mxEvent.UNDO,c);b.addListener(mxEvent.REDO,c);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,c,d,e,f,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);c+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(1,Math.round((document.body.scrollWidth-c-64)/2)),n=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");c=Math.min(c,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
+l.style.width=c+"px";l.style.height=d+"px";l.style.left=m+"px";l.style.top=n+"px";l.style.zIndex=this.zIndex;null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.left="0px",this.bg.style.top="0px",this.bg.style.bottom="0px",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));e&&document.body.appendChild(this.bg);l.appendChild(b);
+document.body.appendChild(l);f&&(b=document.createElement("img"),b.setAttribute("src",Dialog.prototype.closeImage),b.setAttribute("title",mxResources.get("close")),b.className="geDialogClose",b.style.top=n+14+"px",b.style.left=m+c+38-k+"px",b.style.zIndex=this.zIndex,mxEvent.addListener(b,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(b),this.dialogImg=b,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.onDialogClose=
+g;this.container=l;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+
+"/clear.gif";
+Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
+"/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);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var b=k.checked||m.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=.75*d,e=c.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/c.pageScale;if(b){var g=k.checked?1:parseInt(n.value);isNaN(g)||(f=mxUtils.getScaleForPageCount(g,c,e))}c.getGraphBounds();var l=g=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*d);e.height=Math.ceil(e.height*d);f*=d;!b&&c.pageVisible?(d=c.getPageLayout(),g-=d.x*e.width,l-=d.y*e.height):
+b=!0;b=PrintDialog.createPrintPreview(c,f,e,0,g,l,b);b.open();a&&PrintDialog.printPreview(b)}var c=a.editor.graph,d,e,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");e=document.createElement("td");e.setAttribute("colspan","2");e.style.fontSize="10pt";e.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("fitPage"));
+e.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(a)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(e);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");e=document.createElement("td");e.style.fontSize="10pt";e.appendChild(m);l=document.createElement("span");mxUtils.write(l," "+mxResources.get("posterPrint")+":");e.appendChild(l);mxEvent.addListener(l,
+"click",function(a){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(a)});d.appendChild(e);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";e=document.createElement("td");e.style.fontSize="10pt";e.appendChild(n);mxUtils.write(e," "+mxResources.get("pages")+" (max)");d.appendChild(e);g.appendChild(d);mxEvent.addListener(m,"change",
+function(){m.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);e=document.createElement("td");mxUtils.write(e,mxResources.get("pageScale")+":");d.appendChild(e);e=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";e.appendChild(p);d.appendChild(e);g.appendChild(d);d=document.createElement("tr");e=document.createElement("td");e.colSpan=2;
+e.style.paddingTop="20px";e.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&e.appendChild(l);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});q.className="geBtn";e.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});q.className="geBtn gePrimaryBtn";e.appendChild(q);a.editor.cancelFirst||
+e.appendChild(l);d.appendChild(e);g.appendChild(d);f.appendChild(g);this.container=f};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,c,d,e,f,g){b=new mxPrintPreview(a,b,c,d,e,f);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=g;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var k=b.writeHead;b.writeHead=function(a){k.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==n||n==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=n,m.style.backgroundImage="")}function c(){null==r?(q.removeAttribute("title"),q.style.fontSize="",q.innerHTML=mxResources.get("change")+"..."):(q.setAttribute("title",r.src),q.style.fontSize="11px",q.innerHTML=r.src.substring(0,42)+"...")}var d=a.editor.graph,e,f,g=document.createElement("table");g.style.width=
+"100%";g.style.height="100%";var k=document.createElement("tbody");e=document.createElement("tr");f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("paperSize")+":");e.appendChild(f);f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";var l=PageSetupDialog.addPageFormatPanel(f,"pagesetupdialog",d.pageFormat);e.appendChild(f);k.appendChild(e);e=document.createElement("tr");f=document.createElement("td");
+mxUtils.write(f,mxResources.get("background")+":");e.appendChild(f);f=document.createElement("td");f.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="18px";m.style.height="18px";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var n=d.background;b();mxEvent.addListener(m,"click",function(c){a.pickColor(n||"none",function(a){n=a;b()});mxEvent.consume(c)});
+f.appendChild(m);mxUtils.write(f,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();f.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?d.getGridSize():a)});e.appendChild(f);k.appendChild(e);e=document.createElement("tr");f=document.createElement("td");mxUtils.write(f,mxResources.get("image")+
+":");e.appendChild(f);f=document.createElement("td");var q=document.createElement("a");q.style.textDecoration="underline";q.style.cursor="pointer";q.style.color="#a0a0a0";var r=d.backgroundImage;mxEvent.addListener(q,"click",function(b){a.showBackgroundImageDialog(function(a){r=a;c()});mxEvent.consume(b)});c();f.appendChild(q);e.appendChild(f);k.appendChild(e);e=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="16px";f.setAttribute("align","right");var t=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&f.appendChild(t);var u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=n&&a.setBackgroundColor(n);d.backgroundImage!==r&&a.setBackgroundImage(r);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});u.className="geBtn gePrimaryBtn";f.appendChild(u);a.editor.cancelFirst||f.appendChild(t);e.appendChild(f);k.appendChild(e);g.appendChild(k);
+this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,b,c,d){function e(a,b,d){if(d||p!=document.activeElement&&q!=document.activeElement){a=!1;for(b=0;b<t.length;b++)d=t[b],y?"custom"==d.key&&(k.value=d.key,y=!1):null!=d.format&&(c.width==d.format.width&&c.height==d.format.height?(k.value=d.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,a=!0):c.width==d.format.height&&c.height==d.format.width&&(k.value=d.key,f.removeAttribute("checked"),
+f.defaultChecked=!1,f.checked=!1,g.setAttribute("checked","checked"),g.defaultChecked=!0,a=g.checked=!0));a?(l.style.display="",n.style.display="none"):(p.value=c.width,q.value=c.height,z.setAttribute("selected","selected"),f.setAttribute("checked","checked"),f.defaultChecked=!0,l.style.display="none",n.style.display="")}}b="format-"+b;var f=document.createElement("input");f.setAttribute("name",b);f.setAttribute("type","radio");f.setAttribute("value","portrait");var g=document.createElement("input");
+g.setAttribute("name",b);g.setAttribute("type","radio");g.setAttribute("value","landscape");var k=document.createElement("select");k.style.marginBottom="8px";k.style.width="202px";var l=document.createElement("div");l.style.marginLeft="4px";l.style.width="210px";l.style.height="24px";f.style.marginRight="6px";l.appendChild(f);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));l.appendChild(b);g.style.marginLeft="10px";g.style.marginRight="6px";l.appendChild(g);
+var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));l.appendChild(m);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var p=document.createElement("input");p.setAttribute("size","6");p.setAttribute("value",c.width);n.appendChild(p);mxUtils.write(n," x ");var q=document.createElement("input");q.setAttribute("size","6");q.setAttribute("value",c.height);n.appendChild(q);mxUtils.write(n," pt");
+l.style.display="none";n.style.display="none";for(var r={},t=PageSetupDialog.getFormats(),u=0;u<t.length;u++){var x=t[u];r[x.key]=x;var z=document.createElement("option");z.setAttribute("value",x.key);mxUtils.write(z,x.title);k.appendChild(z)}var y=!1;e();a.appendChild(k);mxUtils.br(a);a.appendChild(l);a.appendChild(n);var A=c,v=function(){var a=r[k.value];null!=a.format?(p.value=a.format.width,q.value=a.format.height,n.style.display="none",l.style.display=""):(l.style.display="none",n.style.display=
+"");a=new mxRectangle(0,0,parseInt(p.value),parseInt(q.value));"custom"!=k.value&&g.checked&&(a=new mxRectangle(0,0,a.height,a.width));if(a.width!=A.width||a.height!=A.height)A=a,null!=d&&d(A)};mxEvent.addListener(b,"click",function(a){f.checked=!0;v();mxEvent.consume(a)});mxEvent.addListener(m,"click",function(a){g.checked=!0;v();mxEvent.consume(a)});mxEvent.addListener(p,"blur",v);mxEvent.addListener(p,"click",v);mxEvent.addListener(q,"blur",v);mxEvent.addListener(q,"click",v);mxEvent.addListener(g,
+"change",v);mxEvent.addListener(f,"change",v);mxEvent.addListener(k,"change",function(){y="custom"==k.value;v()});v();return{set:function(a){c=a;e(null,null,!0)},get:function(){return A},widthInput:p,heightInput:q}};
+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:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1652)},{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,584,826)},{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 b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(b){a.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),
mxUtils.bind(this,function(b){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
@@ -2021,7 +2059,7 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,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=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+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 e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,k=d*this.pageScale,g=this.view.getBackgroundPageBounds();b=g.width;c=g.height;var l=new mxRectangle(d*e.x,d*
-e.y,f.width*k,f.height*k),m=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(c/l.height)-1:0,z=a?Math.ceil(b/l.width)-1:0,x=g.x+b,A=g.y+c;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?m:z,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(g.x),Math.round(g.y+(c+1)*l.height)),new mxPoint(Math.round(x),
+e.y,f.width*k,f.height*k),m=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(c/l.height)-1:0,z=a?Math.ceil(b/l.width)-1:0,y=g.x+b,A=g.y+c;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?m:z,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(g.x),Math.round(g.y+(c+1)*l.height)),new mxPoint(Math.round(y),
Math.round(g.y+(c+1)*l.height))]:[new mxPoint(Math.round(g.x+(c+1)*l.width),Math.round(g.y)),new mxPoint(Math.round(g.x+(c+1)*l.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 b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var e=0;e<c.length;e++)if(this.graph.getModel().isVertex(c[e])){var f=this.graph.getCellGeometry(c[e]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var c=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=c.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,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),g=Math.floor(Math.min(0,c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+
@@ -2037,14 +2075,14 @@ function(a){d.container.style.cursor="";e=!1});mxEvent.addListener(document,"key
function(a){return k.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 l=!1,m=null,n=null,p=null,q=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;
if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=a;n=c;p=b}}),r=this,t=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){t.apply(this,arguments);q();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;
if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=r.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));r.toolbar.setFontName(c);r.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var u=d.cellEditor.stopEditing;
-d.cellEditor.stopEditing=function(a,b){u.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var y=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
-mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var z="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
+d.cellEditor.stopEditing=function(a,b){u.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var x=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();x.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
+mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var z="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
e.push(f));f=d.getModel().getStyle(b.cell);for(var k=null!=f?f.split(";"):[],g=0;g<k.length;g++){var l=k[g],m=l.indexOf("=");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle=d.defaultVertexStyle;this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),H=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<H.length;a++)for(b=0;b<H[a].length;b++)z.push(H[a][b]);for(a=0;a<x.length;a++)z.push(x[a]);var E=function(a,b){d.getModel().beginUpdate();
-try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=z.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var r=p.substring(0,q),t=mxUtils.indexOf(n,r);0<=t&&n.splice(t,1);for(var u=0;u<H.length;u++){var y=H[u];if(0<=mxUtils.indexOf(y,r))for(var A=
-0;A<y.length;A++){var v=mxUtils.indexOf(n,y[A]);0<=v&&n.splice(v,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var r=n[f],C=e[r];null==C||"shape"==r&&!c||(!c||0>mxUtils.indexOf(x,r))&&d.setCellStyles(r,C,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
-b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));E(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&(e=d.getModel().isVertex(c[k])||e,!(f=d.getModel().isEdge(c[k])||f)||!e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(A,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
-mxUtils.indexOf(x,c[k]))f||0<=mxUtils.indexOf(v,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(z,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(z,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(v,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),E=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<E.length;a++)for(b=0;b<E[a].length;b++)z.push(E[a][b]);for(a=0;a<y.length;a++)z.push(y[a]);var H=function(a,b){d.getModel().beginUpdate();
+try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=z.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var r=p.substring(0,q),t=mxUtils.indexOf(n,r);0<=t&&n.splice(t,1);for(var u=0;u<E.length;u++){var x=E[u];if(0<=mxUtils.indexOf(x,r))for(var v=
+0;v<x.length;v++){var A=mxUtils.indexOf(n,x[v]);0<=A&&n.splice(A,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var r=n[f],D=e[r];null==D||"shape"==r&&!c||(!c||0>mxUtils.indexOf(y,r))&&d.setCellStyles(r,D,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){H(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){H(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
+b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));H(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&(e=d.getModel().isVertex(c[k])||e,!(f=d.getModel().isEdge(c[k])||f)||!e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(A,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
+mxUtils.indexOf(y,c[k]))f||0<=mxUtils.indexOf(v,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(z,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(z,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(v,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}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=
@@ -2069,20 +2107,20 @@ EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.g
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 b=null;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(b,c){if(null!=a.container){var d=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=a.view.translate,f=a.view.scale,d=mxRectangle.fromRectangle(d);d.x=d.x/f-e.x;d.y=d.y/f-e.y;d.width/=f;d.height/=f;var e=
a.container.scrollTop,k=a.container.scrollLeft,g=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)g+=3;var l=a.container.offsetWidth-g,m=b?Math.max(.3,Math.min(c||1,l/d.width)):f;a.view.scaleAndTranslate(m,Math.max((l-m*d.width)/2,0)/m-d.x,Math.max((a.container.offsetHeight-g-m*d.height)/4,0)/m-d.y);a.container.scrollTop=e*m/f;a.container.scrollLeft=k*m/f}});var c=mxUtils.bind(this,function(){b(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",c)});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)};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%";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 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):
+"#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 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",d);d();var e=0,d=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=d(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();
-mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")||"Previous Page"),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")||"Next Page"),l=mxUtils.bind(this,function(){null!=
-this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",f.style.display="",g.style.display="inline-block"):(k.style.display="none",f.style.display="none",g.style.display=
-"none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,(mxResources.get("zoomOut")||"Zoom Out")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,(mxResources.get("zoomIn")||"Zoom In")+" (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")||"Fit");var n=null,p=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),r=mxUtils.bind(this,
-function(a){null!=n&&(window.clearTimeout(n),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 t=d(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=t.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")||"Layers"),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){t.style.display=1<u.getChildCount(u.root)?"":"none"})}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")||"Open in New Window");a.lightbox&&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")||
-"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*e+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||r(30),q())}));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)?q():r(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():r(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var y=a.getTolerance(),z=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)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())<y&&(0<parseFloat(z.chromelessToolbar.style.opacity||0)?q():r(30))}})}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(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.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(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),k=a.minimumGraphSize;if(null==
+mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&
+null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",f.style.display="",g.style.display="inline-block"):(k.style.display="none",f.style.display="none",g.style.display="none");l()});this.editor.addListener("resetGraphView",
+m);this.editor.addListener("pageSelected",l);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 n=null,p=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),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 t=d(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=t.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")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){t.style.display=1<u.getChildCount(u.root)?"":"none"})}d(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"));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&&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);this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||r(30),q())}));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)?q():r(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():r(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var x=a.getTolerance(),z=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)<x&&Math.abs(this.scrollTop-a.container.scrollTop)<x&&Math.abs(this.startX-c.getGraphX())<x&&Math.abs(this.startY-c.getGraphY())<x&&(0<parseFloat(z.chromelessToolbar.style.opacity||0)?q():r(30))}})}else if(this.editor.extendCanvas){var y=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}y.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(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),k=a.minimumGraphSize;if(null==
k||k.width!=e||k.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&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(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
1;var v=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!=v&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-v.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
@@ -2172,12 +2210,12 @@ function(){var a=n.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 p=new mxRubberband(this);
this.getRubberband=function(){return p};var q=(new Date).getTime(),r=0,t=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;t.apply(this,arguments);a!=this.currentState?(q=(new Date).getTime(),r=0):r=(new Date).getTime()-q};var u=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"))&&u.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||mxEvent.isShiftDown(a)};var z=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return z.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 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))};
+"outlineConnect","1"))&&u.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var z=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return z.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(y=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=y)}));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 v=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return v.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 k=this.getModel(),g=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var m=k.getChildCount(e),n=0;n<m;n++){var p=
-k.getChildAt(e,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var r=mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
-!1:H.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)),p.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=
+k.getChildAt(e,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var r=mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
+!1:E.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 H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();H=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)),p.start(c.x,c.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);H=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 G=this.updateMouseEvent;this.updateMouseEvent=function(a){a=G.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);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;
@@ -2195,8 +2233,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
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 k=c?"getUTC":"get",l=a[k+"Date"](),m=a[k+"Day"](),n=a[k+"Month"](),p=a[k+"FullYear"](),q=a[k+"Hours"](),r=a[k+"Minutes"](),t=a[k+"Seconds"](),k=a[k+"Milliseconds"](),u=c?0:a.getTimezoneOffset(),y={d:l,dd:g(l),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
-12],yy:String(p).slice(2),yyyy:p,h:q%12||12,hh:g(q%12||12),H:q,HH:g(q),M:r,MM:g(r),s:t,ss:g(t),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<u?"-":"+")+g(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%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 k=c?"getUTC":"get",l=a[k+"Date"](),m=a[k+"Day"](),n=a[k+"Month"](),p=a[k+"FullYear"](),q=a[k+"Hours"](),r=a[k+"Minutes"](),t=a[k+"Seconds"](),k=a[k+"Milliseconds"](),u=c?0:a.getTimezoneOffset(),x={d:l,dd:g(l),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
+12],yy:String(p).slice(2),yyyy:p,h:q%12||12,hh:g(q%12||12),H:q,HH:g(q),M:r,MM:g(r),s:t,ss:g(t),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<u?"-":"+")+g(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[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.setAttribute("type","checkbox");b.isVisible(c)&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d.appendChild(e);var k=c.value||
mxResources.get("background")||"Background";d.setAttribute("title",k);mxUtils.write(d,k);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};
@@ -2278,13 +2316,13 @@ arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=
this.graph.currentEdgeStyle[b];return a};var c=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=c.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var c=
b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",html:"1",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+";");"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(K){}return d}if(null!=
+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(J){}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),k=b.getTerminal(e,!1);b.setTerminal(e,k,!0);b.setTerminal(e,f,!1);var g=b.getGeometry(e);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var l=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);
g.setTerminalPoint(l,!1);g.setTerminalPoint(m,!0);b.setGeometry(e,g);var n=this.view.getState(e),p=this.view.getState(f),q=this.view.getState(k);if(null!=n){var r=null!=p?this.getConnectionConstraint(n,p,!0):null,t=null!=q?this.getConnectionConstraint(n,q,!1):null;this.setConnectionConstraint(e,f,!0,t);this.setConnectionConstraint(e,k,!1,r)}c.push(e)}}else if(b.isVertex(e)&&(g=this.getCellGeometry(e),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var u=g.width;g.width=g.height;
-g.height=u;b.setGeometry(e,g);var y=this.view.getState(e);if(null!=y){var D=y.style[mxConstants.STYLE_DIRECTION]||"east";"east"==D?D="south":"south"==D?D="west":"west"==D?D="north":"north"==D&&(D="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,D,[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);
+g.height=u;b.setGeometry(e,g);var x=this.view.getState(e);if(null!=x){var C=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==C?C="south":"south"==C?C="west":"west"==C?C="north":"north"==C&&(C="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,C,[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=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&
d==mxConstants.NONE&&b.push(a[c])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.setAttributeForCell=function(a,b,c){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!=c&&
@@ -2318,22 +2356,22 @@ c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)last
if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=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,k){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(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 k=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&&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)}k.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
-mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0,
-g.length-1));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(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=f?"bold":"normal";this.textarea.style.fontStyle=
-k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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 g=mxUtils.htmlEntities(this.textarea.innerHTML);
-mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!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!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=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 c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;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)/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="",
-l.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 m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(ca){}};
+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(da){}};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 k=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&&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)}k.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||
+8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==
+g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD,k=(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=
+f?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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 g=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!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!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=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 c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;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)/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=
+"",l.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 m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}};
var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(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 p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&
(e=null);p.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=
@@ -2360,14 +2398,14 @@ e,this.graph.getDefaultParent(),!0,!0),c=0;c<g.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,k=this.graph.tolerance;if(null!=this.div||Math.abs(e)>k||Math.abs(f)>k)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 t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);t.apply(this,arguments)};var u=(new Date).getTime(),y=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){z.apply(this,arguments);c!=this.currentTerminalState?(u=(new Date).getTime(),
-y=0):y=(new Date).getTime()-u;this.currentTerminalState=c};var x=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"))&&x.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 t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);t.apply(this,arguments)};var u=(new Date).getTime(),x=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){z.apply(this,arguments);c!=this.currentTerminalState?(u=(new Date).getTime(),
+x=0):x=(new Date).getTime()-u;this.currentTerminalState=c};var y=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&y.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 v=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 v.apply(this,arguments)};var H=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))):H.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 G=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){G.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()?"":
+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 v.apply(this,arguments)};var E=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))):E.apply(this,arguments)};var H=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)&&H.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 G=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){G.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.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));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);this.updateLinkHint(c);null!=c&&(a=!0);a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b){if(null==b||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="4px 10px 6px 10px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter=
@@ -2376,15 +2414,15 @@ b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.
mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){F.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));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell);null!=b&&(this.updateLinkHint(b),this.redrawHandles())};var I=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var M=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){M.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
+"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+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 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 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 ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var T=mxEdgeHandler.prototype.destroy;mxEdgeHandler.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),
+a.height+6+this.state.view.graph.tolerance)+"px"}};var aa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){aa.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 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 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(){mxActor.call(this)}function t(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,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function H(){mxShape.call(this)}function E(){mxShape.call(this)}function G(){mxEllipse.call(this)}function C(){mxShape.call(this)}
-function B(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function N(){mxShape.call(this)}function M(){mxShape.call(this)}function U(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function ba(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function ca(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function J(){mxActor.call(this)}
-function X(){mxActor.call(this)}function fa(){mxActor.call(this)}function K(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxActor.call(this)}function Y(){mxActor.call(this)}function aa(){mxActor.call(this)}function Q(){mxActor.call(this)}function W(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function R(){mxEllipse.call(this)}function V(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function la(){mxEllipse.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function z(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function E(){mxShape.call(this)}function H(){mxShape.call(this)}function G(){mxEllipse.call(this)}function D(){mxShape.call(this)}
+function B(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function N(){mxShape.call(this)}function L(){mxShape.call(this)}function U(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function aa(){mxDoubleEllipse.call(this)}function S(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function K(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}
+function X(){mxActor.call(this)}function O(){mxActor.call(this)}function J(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function Q(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function R(){mxEllipse.call(this)}function V(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function la(){mxEllipse.call(this)}
function ma(){mxActor.call(this)}function na(){mxActor.call(this)}function oa(){mxActor.call(this)}function xa(a,b,c,d,e,f,k,g,l,m){k+=l;var n=d.clone();d.x-=e*(2*k+l);d.y-=f*(2*k+l);e*=k+l;f*=k+l;return function(){a.ellipse(n.x-e-k,n.y-f-k,2*k,2*k);m?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()};mxCellRenderer.prototype.defaultShapes.cube=a;var ua=Math.tan(mxUtils.toRadians(30)),ja=(.5-ua)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/ua);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+ua));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=
@@ -2407,44 +2445,44 @@ mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"
mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?(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 Ea=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ea.apply(this,arguments)};mxUtils.extend(u,mxRectangleShape);u.prototype.size=.1;u.prototype.isHtmlAllowed=function(){return!1};u.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};u.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 k=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));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=u;mxUtils.extend(y,mxActor);y.prototype.size=.2;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(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=y;mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.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=z;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 ya=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){ya.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));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=u;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(z,mxHexagon);z.prototype.size=.25;z.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=z;mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.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=y;var ya=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){ya.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),ya.apply(this,[a,b,c,d,e]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.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};A.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,k;do{k=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=k){var g=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+f+"Height"],
p=this.style["symbol"+f+"Spacing"]||0,q=this.style["symbol"+f+"ArcSpacing"];null!=q&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*q);var q=b,r=c,q=g==mxConstants.ALIGN_CENTER?q+(d-m)/2:g==mxConstants.ALIGN_RIGHT?q+(d-m-p):q+p,r=l==mxConstants.ALIGN_MIDDLE?r+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?r+(e-n-p):r+p;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,q,r,m,n);a.restore()}f++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.prototype.defaultShapes.ext=A;mxUtils.extend(v,mxCylinder);v.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=v;mxUtils.extend(H,mxShape);H.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=H;mxUtils.extend(E,mxShape);E.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};E.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=E;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(C,mxShape);C.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=C;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.ext=A;mxUtils.extend(v,mxCylinder);v.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=v;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(H,mxShape);H.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};H.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=H;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(D,mxShape);D.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=D;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(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)))),k=mxUtils.getValue(this.style,
"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=F&&(k=new k,k.apply(this.state),a.save(),k.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(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(a.x,a.y,b,c)};I.prototype.paintBackground=function(a,b,c,d,
e){var f=this.corner,k=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=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+k,c);a.lineTo(b+k,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,k-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=
I;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);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)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+k);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-k,f/2);a.quadTo((d-f)/2-k,f+k,d/2,f+k);a.quadTo((d+f)/2+k,f+k,(d+f)/2+k,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=M;mxUtils.extend(U,
+(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);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(L,
+mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+k);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-k,f/2);a.quadTo((d-f)/2-k,f+k,d/2,f+k);a.quadTo((d+f)/2+k,f+k,(d+f)/2+k,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=L;mxUtils.extend(U,
mxCylinder);U.prototype.jettyWidth=32;U.prototype.jettyHeight=12;U.prototype.redrawPath=function(a,b,c,d,e,f){var k=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=k/2;var k=c+k/2,g=.3*e-b/2,l=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(k,g),a.lineTo(k,g+b),a.lineTo(c,g+b),a.moveTo(c,l),a.lineTo(k,l),a.lineTo(k,l+b),a.lineTo(c,l+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,l+b),a.lineTo(0,
-l+b),a.lineTo(0,l),a.lineTo(c,l),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=U;mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.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=P;mxUtils.extend(ba,
-P);ba.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=ba;mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=T;mxUtils.extend(D,mxArrowConnector);D.prototype.defaultWidth=10;D.prototype.defaultArrowWidth=
-20;D.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};D.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=D;mxUtils.extend(ca,mxActor);ca.prototype.size=30;
-ca.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=ca;mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=
-function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));k=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+k,c);a.lineTo(b+
-k,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=L;mxUtils.extend(J,mxActor);J.prototype.dx=20;J.prototype.dy=20;J.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=J;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(fa,mxActor);fa.prototype.arrowWidth=.3;fa.prototype.arrowSize=.2;fa.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,k=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,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=fa;mxUtils.extend(K,mxActor);K.prototype.redrawPath=
-function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",fa.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",fa.prototype.arrowSize))));c=(e-f)/2;var f=c+f,k=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,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=K;mxUtils.extend(O,mxActor);O.prototype.size=.1;O.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=O;mxUtils.extend(S,mxActor);S.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=S;mxUtils.extend(Y,mxActor);Y.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=Y;mxUtils.extend(aa,mxActor);aa.prototype.size=20;aa.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=aa;mxUtils.extend(Q,mxActor);Q.prototype.size=.375;Q.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=Q;mxUtils.extend(W,mxEllipse);W.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=
-W;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,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=Z;mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();
+l+b),a.lineTo(0,l),a.lineTo(c,l),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=U;mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.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=P;mxUtils.extend(aa,
+P);aa.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=aa;mxUtils.extend(S,mxArrowConnector);S.prototype.defaultWidth=4;S.prototype.isOpenEnded=function(){return!0};S.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};S.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=S;mxUtils.extend(C,mxArrowConnector);C.prototype.defaultWidth=10;C.prototype.defaultArrowWidth=
+20;C.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};C.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};C.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=C;mxUtils.extend(W,mxActor);W.prototype.size=30;W.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=W;mxUtils.extend(K,mxRectangleShape);K.prototype.dx=20;K.prototype.dy=20;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.paintForeground=function(a,
+b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));k=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+k,c);a.lineTo(b+k,
+c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=K;mxUtils.extend(da,mxActor);da.prototype.dx=20;da.prototype.dy=20;da.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=da;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(O,mxActor);O.prototype.arrowWidth=.3;O.prototype.arrowSize=.2;O.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,k=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,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=O;mxUtils.extend(J,mxActor);J.prototype.redrawPath=
+function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize))));c=(e-f)/2;var f=c+f,k=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,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=J;mxUtils.extend(M,mxActor);M.prototype.size=.1;M.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=M;mxUtils.extend(T,mxActor);T.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=T;mxUtils.extend(ba,mxActor);ba.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=ba;mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.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=Y;mxUtils.extend(Q,mxActor);Q.prototype.size=.375;Q.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=Q;mxUtils.extend(Z,mxEllipse);Z.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=
+Z;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(R,mxEllipse);R.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=R;mxUtils.extend(V,mxRhombus);V.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=V;mxUtils.extend(ga,
-mxEllipse);ga.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=ga;mxUtils.extend(da,mxEllipse);da.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=da;mxUtils.extend(ha,mxEllipse);ha.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(),"1"==mxUtils.getValue(this.style,"top","1")&&(a.begin(),
+mxEllipse);ga.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=ga;mxUtils.extend(ea,mxEllipse);ea.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=ea;mxUtils.extend(ha,mxEllipse);ha.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(),"1"==mxUtils.getValue(this.style,"top","1")&&(a.begin(),
a.moveTo(b,c),a.lineTo(b+d,c),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"right","1")&&(a.begin(),a.moveTo(b+d,c),a.lineTo(b+d,c+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"bottom","1")&&(a.begin(),a.moveTo(b+d,c+e),a.lineTo(b,c+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"left","1")&&(a.begin(),a.moveTo(b,c+e),a.lineTo(b,c),a.end(),a.stroke()))};mxCellRenderer.prototype.defaultShapes.partialRectangle=ha;mxUtils.extend(la,mxEllipse);la.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=la;mxUtils.extend(ma,mxActor);ma.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=
ma;mxUtils.extend(na,mxActor);na.prototype.size=.2;na.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 k=(d-f)/2,f=k+f;a.moveTo(0,b);a.lineTo(k,b);a.lineTo(k,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(k,e);a.lineTo(k,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=na;mxUtils.extend(oa,mxActor);oa.prototype.size=
@@ -2452,12 +2490,12 @@ ma;mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.redrawPath=funct
n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,k,g,l,m){var n=e*(k+l+1),p=f*(k+l+1);return function(){a.begin();a.moveTo(d.x-n/2-p/2,d.y-p/2+n/2);a.lineTo(d.x+p/2-3*n/2,d.y-3*p/2-n/2);a.moveTo(d.x-n/2+p/2,d.y-p/2-n/2);a.lineTo(d.x-p/2-3*n/2,d.y-3*p/2+n/2);a.stroke()}});mxMarker.addMarker("circle",xa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,k,g,l,m){var n=d.clone(),p=xa.apply(this,arguments),q=e*(k+2*l),r=f*(k+2*l);return function(){p.apply(this,arguments);a.begin();
a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*q+e*l,n.y-2*r+f*l);a.moveTo(n.x-q-r+f*l,n.y-r+q-e*l);a.lineTo(n.x+r-q-f*l,n.y-r-q+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,k,g,l,m){b=e*l*1.118;c=f*l*1.118;e*=k+l;f*=k+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);g?a.lineTo(n.x-e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=
null!=a?a:2;return function(b,c,d,e,f,k,g,l,m,n){f*=g+m;k*=g+m;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);l?b.lineTo(p.x-f-k/a,p.y-k+f/a):b.lineTo(p.x+k/a-f,p.y-k-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var za=function(a,b,c){return pa(a,["width"],b,function(b,d,e,f,k){k=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*k/2,f.y+e*b/4-d*k/2)},function(b,d,e,f,k,g){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*
-b)/a.view.scale-c})},pa=function(a,b,c,d,e){var f=a.absolutePoints,k=f.length-1,g=a.view.translate,l=a.view.scale,m=c?f[0]:f[k],n=c?f[1]:f[k-1],p=n.x-m.x,q=n.y-m.y,r=Math.sqrt(p*p+q*q);return ea(a,b,function(a){a=d.call(this,r,p/r,q/r,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+q*q);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,q/a,m,n,b,c)})},ka=function(a){return function(b){return[ea(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",fa.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",fa.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))})]}},va=function(a,b,c){return function(d){var e=[ea(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(ia(d));return e}},ra=function(a,b,c){c=null!=c?c:1;return function(d){var e=[ea(d,["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))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ia(d));return e}},Aa=function(a){return function(b){var c=[ea(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.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)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(ia(b));return c}},qa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b}},ia=function(a,b){return ea(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=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)*d),c.y+(null!=b?b:c.height/8))},function(a,b,c){this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.min(50,Math.max(0,100*(a.width-b.x+a.x)/Math.min(a.width,a.height))))})},ea=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);a.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};a.getPosition=c;a.setPosition=d;a.ignoreGrid=null!=e?e:!0;return a},wa={link:function(a){return[za(a,!0,10),za(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)!=
+b)/a.view.scale-c})},pa=function(a,b,c,d,e){var f=a.absolutePoints,k=f.length-1,g=a.view.translate,l=a.view.scale,m=c?f[0]:f[k],n=c?f[1]:f[k-1],p=n.x-m.x,q=n.y-m.y,r=Math.sqrt(p*p+q*q);return fa(a,b,function(a){a=d.call(this,r,p/r,q/r,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+q*q);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,q/a,m,n,b,c)})},ka=function(a){return function(b){return[fa(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"arrowWidth",O.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",O.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))})]}},va=function(a,b,c){return function(d){var e=[fa(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(ia(d));return e}},ra=function(a,b,c){c=null!=c?c:1;return function(d){var e=[fa(d,["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))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ia(d));return e}},Aa=function(a){return function(b){var c=[fa(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.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)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
+!1)&&c.push(ia(b));return c}},qa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b}},ia=function(a,b){return fa(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=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)*d),c.y+(null!=b?b:c.height/8))},function(a,b,c){this.state.style[mxConstants.STYLE_ARCSIZE]=
+Math.round(Math.min(50,Math.max(0,100*(a.width-b.x+a.x)/Math.min(a.width,a.height))))})},fa=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);a.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};a.getPosition=c;a.setPosition=d;a.ignoreGrid=null!=e?e:!0;return a},wa={link:function(a){return[za(a,!0,10),za(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(pa(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,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,
f.y,f.x+e,f.y-d,g.x,g.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(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.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(pa(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,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,
@@ -2466,43 +2504,43 @@ a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-pars
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,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,g.x,g.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(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(l.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(pa(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,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,g.x,g.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(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=
-a.style.endWidth);mxEvent.isAltDown(l.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=[ea(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
+a.style.endWidth);mxEvent.isAltDown(l.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=[fa(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(ia(a,c/2))}return b},label:qa(),ext:qa(),rectangle:qa(),triangle:qa(),rhombus:qa(),umlLifeline:function(a){return[ea(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){var b=
-[ea(a,["width","height"],function(a){var b=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),c=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+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,b.y-a.y)))},
-!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},process:function(a){var b=[ea(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.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(ia(a));return b},cross:function(a){return[ea(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",na.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[ea(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=[ea(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ca.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(ia(a));return b},dataStorage:function(a){return[ea(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.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))})]},internalStorage:function(a){var b=[ea(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),
-c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.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(ia(a));return b},corner:function(a){return[ea(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",J.prototype.dx))),
-c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",J.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[ea(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:ka(1),doubleArrow:ka(.5),folder:function(a){return[ea(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[ea(a,["size"],
-function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.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[ea(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.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[ea(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.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(y.prototype.size,!0),hexagon:ra(z.prototype.size,!0,.5),curlyBracket:ra(q.prototype.size,!1),display:ra(oa.prototype.size,!1),cube:va(1,
-a.prototype.size,!1),card:va(.5,k.prototype.size,!0),loopLimit:va(.5,aa.prototype.size,!0),trapezoid:Aa(.5),parallelogram:Aa(1)};Graph.createHandle=ea;Graph.handleFactory=wa;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=wa[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=wa[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),ka=mxUtils.toRadians(-30),sa=mxUtils.getRotatedPoint(sa,
-Math.cos(ka),Math.sin(ka)),ka=mxUtils.toRadians(-150),ta=mxUtils.getRotatedPoint(ta,Math.cos(ka),Math.sin(ka));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=sa.x,m=sa.y,n=ta.x,p=ta.y,q="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=k&&null!=g){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);q?(c&&(r=new mxPoint(r.x+l*b,r.y+m*b),e.push(r)),r=new mxPoint(r.x+n*a,r.y+p*a)):(c&&(r=new mxPoint(r.x+n*a,r.y+p*a),e.push(r)),r=new mxPoint(r.x+l*b,r.y+m*b));e.push(r)};var r=g;null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fa=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Fa.apply(this,arguments)};b.prototype.constraints=[];c.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;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=
-mxEllipse.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,
+parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ia(a,c/2))}return b},label:qa(),ext:qa(),rectangle:qa(),triangle:qa(),rhombus:qa(),umlLifeline:function(a){return[fa(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){var b=
+[fa(a,["width","height"],function(a){var b=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),c=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+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,b.y-a.y)))},
+!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},process:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.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(ia(a));return b},cross:function(a){return[fa(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",na.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[fa(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=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.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(ia(a));return b},dataStorage:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.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))})]},internalStorage:function(a){var b=[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",K.prototype.dx))),
+c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",K.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(ia(a));return b},corner:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),
+c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.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[fa(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:ka(1),doubleArrow:ka(.5),folder:function(a){return[fa(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[fa(a,["size"],
+function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.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[fa(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.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[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.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),hexagon:ra(z.prototype.size,!0,.5),curlyBracket:ra(q.prototype.size,!1),display:ra(oa.prototype.size,!1),cube:va(1,
+a.prototype.size,!1),card:va(.5,k.prototype.size,!0),loopLimit:va(.5,Y.prototype.size,!0),trapezoid:Aa(.5),parallelogram:Aa(1)};Graph.createHandle=fa;Graph.handleFactory=wa;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=wa[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=wa[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),ka=mxUtils.toRadians(-30),sa=mxUtils.getRotatedPoint(sa,Math.cos(ka),Math.sin(ka)),
+ka=mxUtils.toRadians(-150),ta=mxUtils.getRotatedPoint(ta,Math.cos(ka),Math.sin(ka));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=sa.x,m=sa.y,n=ta.x,p=ta.y,q="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=
+k&&null!=g){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);q?(c&&(r=new mxPoint(r.x+l*b,r.y+m*b),e.push(r)),r=new mxPoint(r.x+n*a,r.y+p*a)):(c&&(r=new mxPoint(r.x+n*a,r.y+p*a),e.push(r)),r=new mxPoint(r.x+l*b,r.y+m*b));e.push(r)};var r=g;null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=
+function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Fa.apply(this,arguments)};b.prototype.constraints=[];c.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;y.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=
+mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;
+la.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;Q.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)];H.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),
+!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)];U.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)];l.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)];y.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,
+.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),!1),new mxConnectionConstraint(new mxPoint(.2,.5),!1),new mxConnectionConstraint(new mxPoint(.1,.75),!1),new mxConnectionConstraint(new mxPoint(.9,.25),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.9,.75),!1)];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),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!1),new mxConnectionConstraint(new mxPoint(.875,
.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!1),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)];n.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=
mxRectangleShape.prototype.constraints;m.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;J.prototype.constraints=null;fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.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)];F.prototype.constraints=null;S.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)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0)];mxArrow.prototype.constraints=null;X.prototype.constraints=null;da.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];J.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)];F.prototype.constraints=null;T.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 b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,c=b.editor,d=c.graph,e=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,b){try{var d=mxUtils.parseXml(a),e=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,e);var f=e.getChildren(e.getChildAt(e.getRoot(),0));c.graph.setSelectionCells(c.graph.importCells(f))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@@ -2613,7 +2651,24 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[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(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 r=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return r.apply(this,arguments)}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;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=
+[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 r=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return r.apply(this,arguments)};
+PrintDialog.prototype.create=function(a,b){function c(){r.value=Math.max(1,Math.min(g,Math.max(parseInt(r.value),parseInt(q.value))));q.value=Math.max(1,Math.min(g,Math.min(parseInt(r.value),parseInt(q.value))))}function d(b){function c(a,b,c){var e=a.getGraphBounds(),f=0,k=0,g=ba.get(),l=1/a.pageScale,m=P.checked;if(m)var l=parseInt(M.value),n=parseInt(T.value),l=Math.min(g.height*n/(e.height/a.view.scale),g.width*l/(e.width/a.view.scale));else l=parseInt(U.value)/(100*a.pageScale),isNaN(l)&&(d=
+1/a.pageScale,U.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);l*=d;!m&&a.pageVisible?(e=a.getPageLayout(),f-=e.x*g.width,k-=e.y*g.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,l,g,0,f,k,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var p=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=p.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,
+null,c,!0)}else{g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=m;b.appendGraph(a,l,f,k,c,!0)}return b}var d=parseInt(Y.value)/100;isNaN(d)&&(d=1,Y.value="100 %");var d=.75*d,f=q.value,k=r.value,g=!n.checked,m=null;g&&(g=f==l&&k==l);if(!g&&null!=a.pages&&a.pages.length){var p=0,g=a.pages.length-1;n.checked||(p=parseInt(f)-1,g=parseInt(k)-1);for(var t=p;t<=g;t++){var u=a.pages[t],f=u==a.currentPage?e:null;if(null==f){var f=a.createTemporaryGraph(e.getStylesheet()),
+k=!0,p=!1,x=null,v=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(k=u.viewState.pageVisible,p=u.viewState.mathEnabled,x=u.viewState.background,v=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(p="0"!=u.mapping.diagramMap.get("mathEnabled"),x=u.mapping.diagramMap.get("background"),v=u.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);f.background=x;f.backgroundImage=null!=v?new mxImage(v.src,
+v.width,v.height):null;f.pageVisible=k;f.mathEnabled=p;var z=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?t+1:z.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(u);f.model.setRoot(u.root)}m=c(f,m,t!=g);f!=e&&f.container.parentNode.removeChild(f.container)}}else m=c(e);m.mathEnabled&&(g=m.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),
+g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),b&&(g.writeln("MathJax.Hub.Queue(function () {"),
+g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&b&&PrintDialog.printPreview(m)}var e=a.editor.graph,f=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,b||mxResources.get("print"));f.appendChild(k);var g=1,l=1,m=document.createElement("div");
+m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","all");n.setAttribute("type","radio");n.setAttribute("name","pages-printdialog");m.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));m.appendChild(k);mxUtils.br(m);var p=n.cloneNode(!0);n.setAttribute("checked","checked");p.setAttribute("value","range");
+m.appendChild(p);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");m.appendChild(k);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";m.appendChild(q);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));m.appendChild(k);var r=q.cloneNode(!0);m.appendChild(r);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(r,
+"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",c);mxEvent.addListener(r,"change",c);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){l=k+1;q.value=l;r.value=l;break}q.setAttribute("max",g);r.setAttribute("max",g);1<g&&f.appendChild(m);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);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));t.appendChild(k);var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="50px";t.appendChild(U);mxEvent.addListener(U,"focus",function(){u.checked=!0});f.appendChild(t);var m=m.cloneNode(!1),P=u.cloneNode(!0);P.setAttribute("value","fit");u.setAttribute("checked","checked");k=document.createElement("div");
+k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(P);m.appendChild(k);t=document.createElement("table");t.style.display="inline-block";var aa=document.createElement("tbody"),S=document.createElement("tr"),C=S.cloneNode(!0),W=document.createElement("td"),K=W.cloneNode(!0),da=W.cloneNode(!0),X=W.cloneNode(!0),O=W.cloneNode(!0),J=W.cloneNode(!0);W.style.textAlign="right";X.style.textAlign="right";mxUtils.write(W,mxResources.get("fitTo"));var M=document.createElement("input");
+M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";K.appendChild(M);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross"));da.appendChild(k);mxUtils.write(X,mxResources.get("fitToBy"));var T=M.cloneNode(!0);O.appendChild(T);mxEvent.addListener(M,"focus",function(){P.checked=!0});mxEvent.addListener(T,"focus",function(){P.checked=!0});k=document.createElement("span");mxUtils.write(k,
+mxResources.get("fitToSheetsDown"));J.appendChild(k);S.appendChild(W);S.appendChild(K);S.appendChild(da);C.appendChild(X);C.appendChild(O);C.appendChild(J);aa.appendChild(S);aa.appendChild(C);t.appendChild(aa);m.appendChild(t);f.appendChild(m);m=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));m.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var ba=PageSetupDialog.addPageFormatPanel(k,
+"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));m.appendChild(k);var Y=document.createElement("input");Y.style.cssText="margin:0 8px 0 8px;";Y.setAttribute("value","100 %");Y.style.width="60px";m.appendChild(Y);f.appendChild(m);k=document.createElement("div");k.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&&k.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),t.className="geBtn",k.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",k.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});t.className=
+"geBtn gePrimaryBtn";k.appendChild(t);a.editor.cancelFirst||k.appendChild(m);f.appendChild(k);this.container=f}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;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.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;(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){}})();
@@ -2626,8 +2681,8 @@ length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",spee
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),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages),c=null!=k?mxUtils.getXml(k):""}catch(r){}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,e,f,g,t,u,y){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;u=null!=u?u:!0;var k,l=null;null==c||
-c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?k="_blank":l=k=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),m=b.compress(n);if(b.decompress(m)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,m);m=a.ownerDocument.createElement("mxfile");m.appendChild(n)}y?(m=m.cloneNode(!0),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.setAttribute("userAgent",
+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,e,f,g,t,u,x){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;u=null!=u?u:!0;var k,l=null;null==c||
+c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?k="_blank":l=k=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),m=b.compress(n);if(b.decompress(m)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,m);m=a.ownerDocument.createElement("mxfile");m.appendChild(n)}x?(m=m.cloneNode(!0),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.setAttribute("userAgent",
navigator.userAgent),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a));a=mxUtils.getXml(m);if(!f&&!e&&(g||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(m),b,null!=c?c.getTitle():null,k,l);else if(f||!e&&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,t,u,l);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 f=this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=f&&f.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),
f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g,t){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var k=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());
@@ -2641,7 +2696,7 @@ e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![end
!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=
b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);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,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var k=this.getBaseFilename(),g=k+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(g,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,k),this.saveData(g,a,l,"text/html");
-else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(C){this.handleError(C)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):
+else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(D){this.handleError(D)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"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 p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?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 g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(v){this.handleError(v)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
@@ -2657,20 +2712,20 @@ LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(
mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],k=f.data;if(null!=k){var k=this.convertDataUri(k),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,
f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor=
"inherit");g.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";l.appendChild(m);var z=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),
-null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var x=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),v=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=G&&null!=
+null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var y=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),v=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=G&&null!=
G.parentNode&&G.parentNode.removeChild(G),G=m.cloneNode(!1),G.setAttribute("src",Editor.spinImage),G.setAttribute("title",mxResources.get("saving")),G.style.cursor="default",G.style.marginRight="2px",G.style.marginTop="-2px",l.insertBefore(G,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=G&&null!=G.parentNode&&(G.parentNode.removeChild(G),g.style.paddingRight=18*l.childNodes.length+"px")})):null==z&&(z=m.cloneNode(!1),
-z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),l.insertBefore(z,l.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(g.style.paddingRight=18*l.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,f){a=
-x.cloneCells(mxUtils.sortCells(x.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=x.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);v(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?
-(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;H(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&
-(x.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(k.style.border="3px solid transparent",
-null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),
-null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border=
-"3px solid transparent";k.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,g,l,m,n,p,q,r){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,n),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,
-p.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var t=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));f(l,k);b=b.concat(l);v(a);this.spinner.stop();t=!0}catch(Y){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<
-m.length;g++){var l=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(l)),p=this.editor.graph.getBoundingBoxFromGeometry(n);H(n,new mxRectangle(0,0,p.width,p.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!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,
+z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),l.insertBefore(z,l.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(g.style.paddingRight=18*l.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,c,d,f){a=
+y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=y.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);v(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),H=mxUtils.bind(this,function(a){if(y.isSelectionEmpty())y.getRubberband().isActive()?
+(y.getRubberband().execute(a),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=y.getSelectionCells(),c=y.view.getBounds(b),d=y.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=y.view.translate.x;c.y-=y.view.translate.y;E(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.shape&&
+(y.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!1),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&(k.style.border="3px solid transparent",
+null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.graphHandler.shape&&(y.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",y.autoScroll=!0,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!0),
+null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border=
+"3px solid transparent";k.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,g,l,m,n,p,q,r){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,n),c)],c[0].vertex=!0,E(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,
+p.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var t=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));f(l,k);b=b.concat(l);v(a);this.spinner.stop();t=!0}catch(ba){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<
+m.length;g++){var l=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(l)),p=this.editor.graph.getBoundingBoxFromGeometry(n);E(n,new mxRectangle(0,0,p.width,p.height),a)}t=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}}t||(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,
p)&&null!=r?this.parseFile(r,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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();
a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",A);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&A(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var G=null;mxEvent.addListener(m,"click",E)}g.appendChild(l);g.style.paddingRight=18*l.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&
+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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var G=null;mxEvent.addListener(m,"click",H)}g.appendChild(l);g.style.paddingRight=18*l.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=740>=screen.height?5:46,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,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:
@@ -2685,11 +2740,11 @@ EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"
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,e){if(!mxClient.IS_EDGE&&window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(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 f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,
c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(r){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?
-"&base64="+f:"")+(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),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),y=Array(l-k),z=0;k<l;++z,++k)y[z]=c[k].charCodeAt(0);f[g]=new Uint8Array(y)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f){f=null!=f?f:!1;e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,
+"&base64="+f:"")+(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),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),x=Array(l-k),z=0;k<l;++z,++k)x[z]=c[k].charCodeAt(0);f[g]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f){f=null!=f?f:!1;e=!mxClient.IS_IOS||!navigator.standalone;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)f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=
-window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(y){this.handleError(y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,e,null,null,f?3:4);this.showDialog(b.container,380,this.getServiceCount(f)-1<(f?4:5)?270:390,!0,!0);
+window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,e,null,null,f?3:4);this.showDialog(b.container,380,this.getServiceCount(f)-1<(f?4:5)?270:390,!0,!0);
b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||
-"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,
+"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(x){this.handleError(x)}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,d,null,null,4);this.showDialog(a.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,u){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;k=b?null:this.editor.graph.background;
k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u));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(m,"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,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");
@@ -2698,32 +2753,32 @@ mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("sele
"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",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=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 f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=
b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.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&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.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="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,u,y,z){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=
-e);"auto"!==d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),l.toolbar=c.join(" "));y&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+
+null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,u,x,z){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=
+e);"auto"!==d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),l.toolbar=c.join(" "));x&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+
(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+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 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 l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.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")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),x=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
-":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(e,mxResources.get("allPages"),g,!g),E=this.addCheckbox(e,mxResources.get("layers"),!0),G=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),
-!0);C.style.marginLeft="24px";C.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,x.checked,A.value,n.getTarget(),n.getColor(),v.checked,H.checked,E.checked,G.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");
+document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),y=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(e,mxResources.get("allPages"),g,!g),H=this.addCheckbox(e,mxResources.get("layers"),!0),G=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),
+!0);D.style.marginLeft="24px";D.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,y.checked,A.value,n.getTarget(),n.getColor(),v.checked,E.checked,H.checked,G.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");
g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="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(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.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!=c||null!=d)a+=30,mxUtils.write(g,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%",g.appendChild(p),mxUtils.write(g,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",g.appendChild(q),mxUtils.br(g);var v=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var H=null;
-if(null==l||l.constructor!=window.DriveFile||b)H=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(g,mxResources.get("lightbox"),!0),G=this.addCheckbox(g,mxResources.get("showEditButton"),!0);G.style.marginLeft="24px";var C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=G.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?(C.removeAttribute("disabled"),G.removeAttribute("disabled")):(C.setAttribute("disabled",
-"disabled"),G.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.getTarget(),v.getColor(),null==H?!0:H.checked,E.checked,G.checked,C.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,
+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%",g.appendChild(p),mxUtils.write(g,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",g.appendChild(q),mxUtils.br(g);var v=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var E=null;
+if(null==l||l.constructor!=window.DriveFile||b)E=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var H=this.addCheckbox(g,mxResources.get("lightbox"),!0),G=this.addCheckbox(g,mxResources.get("showEditButton"),!0);G.style.marginLeft="24px";var D=this.addCheckbox(g,mxResources.get("layers"),!0);D.style.marginLeft=G.style.marginLeft;D.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?(D.removeAttribute("disabled"),G.removeAttribute("disabled")):(D.setAttribute("disabled",
+"disabled"),G.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.getTarget(),v.getColor(),null==E?!0:E.checked,H.checked,G.checked,D.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):v.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 g=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,
function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.whiteSpace="nowrap";var l=this.editor.graph,m=280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";k.appendChild(n);mxUtils.write(k,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="100%";k.appendChild(p);mxUtils.write(k,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="0";k.appendChild(q);mxUtils.br(k);var r=this.addCheckbox(k,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==
-l.background),H=this.addCheckbox(k,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");f&&(k.appendChild(E),mxUtils.write(k,mxResources.get("crop")),mxUtils.br(k),m+=26);l.isSelectionEmpty()?E.setAttribute("disabled","disabled"):(E.setAttribute("checked","checked"),E.defaultChecked=!0);var G=this.addCheckbox(k,mxResources.get("shadow"),l.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&&(k.appendChild(C),mxUtils.write(k,mxResources.get("embedImages")),mxUtils.br(k),m+=26);var B=this.addCheckbox(k,mxResources.get("includeCopyOfMyDiagram"),g),F=null!=this.pages&&1<this.pages.length,I=I=this.addCheckbox(k,F?mxResources.get("allPages"):"",F,!F);I.style.marginLeft="24px";I.style.marginBottom="16px";F||(I.style.visibility=
-"hidden");mxEvent.addListener(B,"change",function(){B.checked&&F?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});g&&F||I.setAttribute("disabled","disabled");a=new CustomDialog(this,k,mxUtils.bind(this,function(){e(p.value,r.checked,!H.checked,G.checked,B.checked,C.checked,q.value,E.checked,!I.checked)}),null,c,d);this.showDialog(a.container,320,m,!0,!0);p.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};
+l.background),E=this.addCheckbox(k,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),H=document.createElement("input");H.style.marginTop="16px";H.style.marginRight="8px";H.setAttribute("type","checkbox");f&&(k.appendChild(H),mxUtils.write(k,mxResources.get("crop")),mxUtils.br(k),m+=26);l.isSelectionEmpty()?H.setAttribute("disabled","disabled"):(H.setAttribute("checked","checked"),H.defaultChecked=!0);var G=this.addCheckbox(k,mxResources.get("shadow"),l.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&&(k.appendChild(D),mxUtils.write(k,mxResources.get("embedImages")),mxUtils.br(k),m+=26);var B=this.addCheckbox(k,mxResources.get("includeCopyOfMyDiagram"),g),F=null!=this.pages&&1<this.pages.length,I=I=this.addCheckbox(k,F?mxResources.get("allPages"):"",F,!F);I.style.marginLeft="24px";I.style.marginBottom="16px";F||(I.style.visibility=
+"hidden");mxEvent.addListener(B,"change",function(){B.checked&&F?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});g&&F||I.setAttribute("disabled","disabled");a=new CustomDialog(this,k,mxUtils.bind(this,function(){e(p.value,r.checked,!E.checked,G.checked,B.checked,D.checked,q.value,H.checked,!I.checked)}),null,c,d);this.showDialog(a.container,320,m,!0,!0);p.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};
EditorUi.prototype.showExportJpgDialog=function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";
f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);
-mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),d.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");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,
-!k.checked,y.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var v=1<g.model.getChildCount(g.model.getRoot()),H=this.addCheckbox(f,mxResources.get("layers"),v,!v);H.style.marginLeft=A.style.marginLeft;H.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?
-(v&&H.removeAttribute("disabled"),A.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,A.checked,H.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" 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"+
+mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var x=this.addCheckbox(c,mxResources.get("shadow"),d.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");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,
+!k.checked,x.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var v=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),v,!v);E.style.marginLeft=A.style.marginLeft;E.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?
+(v&&E.removeAttribute("disabled"),A.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,A.checked,E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" 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"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=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");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="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"+
@@ -2731,15 +2786,15 @@ EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.grap
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(k.getAttribute("width")),b=parseInt(k.getAttribute("height")),k.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",k.removeAttribute("height")),""!=q&&k.setAttribute("style",q),g(mxUtils.getXml(k))};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.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=b.background;g==mxConstants.NONE&&(g=null);b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=
c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((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,e,f,g,
-t,u){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,t):null,u)}catch(x){"Invalid image"==x.message?this.downloadFile(u):this.handleError(x)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
-this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,t,u,y,z,x,A,v){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;A=null!=A?A:0;var k=u?null:x.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==u&&(k="#ffffff");this.convertImages(x.getSvg(k,null,null,v,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),
-g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));t=null!=t?t:1;null!=b&&(t=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(t*g)+2*A;l=Math.ceil(t*l)+2*A;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(t,t);m.drawImage(d,A/t,A/t);a(e)});d.onerror=function(a){null!=e&&e(a)};try{y&&this.editor.graph.addSvgShadow(c),this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=
-this.createSvgDataUri(mxUtils.getXml(c))}))}catch(C){null!=e&&e(C)}}),c,z)};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,
+t,u){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,t):null,u)}catch(y){"Invalid image"==y.message?this.downloadFile(u):this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,t,u,x,z,y,A,v){f=null!=f?f:!0;y=null!=y?y:this.editor.graph;A=null!=A?A:0;var k=u?null:y.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==u&&(k="#ffffff");this.convertImages(y.getSvg(k,null,null,v,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),
+g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));t=null!=t?t:1;null!=b&&(t=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(t*g)+2*A;l=Math.ceil(t*l)+2*A;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(t,t);m.drawImage(d,A/t,A/t);a(e)});d.onerror=function(a){null!=e&&e(a)};try{x&&this.editor.graph.addSvgShadow(c),this.convertMath(y,c,!0,mxUtils.bind(this,function(){d.src=
+this.createSvgDataUri(mxUtils.getXml(c))}))}catch(D){null!=e&&e(D)}}),c,z)};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 k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};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,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),l=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var m=l.getElementsByTagName("diagram");if(1==m.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){g.model.beginUpdate();try{for(var n=0;n<m.length;n++){var p=this.updatePageRoot(new DiagramPage(m[n])),
-A=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,p,p,A))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var v=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,v);var H=v.getChildCount(v.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<H;n++){var E=v.getChildAt(v.getRoot(),n);if(1!=H||g.isCellLocked(g.getDefaultParent()))E=g.importCells([E],0,0,g.model.getRoot(),
-null,a)[0],G=g.model.getChildren(E),g.moveCells(G,b,c),f=f.concat(G);else var G=v.getChildren(E),f=f.concat(g.importCells(G,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(B){throw e||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
+A=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,p,p,A))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var v=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,v);var E=v.getChildCount(v.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<E;n++){var H=v.getChildAt(v.getRoot(),n);if(1!=E||g.isCellLocked(g.getDefaultParent()))H=g.importCells([H],0,0,g.model.getRoot(),
+null,a)[0],G=g.model.getChildren(H),g.moveCells(G,b,c),f=f.concat(G);else var G=v.getChildren(H),f=f.concat(g.importCells(G,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(B){throw e||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
b,c,d)}catch(q){}});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.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!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()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,
26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(z){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
@@ -2747,87 +2802,87 @@ this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.
null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var k=null,m;for(m in e.Pages)if(l=e.Pages[m],null!=l&&"0"==l.Properties.Order){k=l;break}null!=
k&&this.insertLucidChart(k,b,c,f)}else{g=this.editor.graph;f=null;g.getModel().beginUpdate();try{f=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=a,g.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)&&
g.setLinkForCell(f,f.value),f.geometry.width+=g.gridSize,f.geometry.height+=g.gridSize}finally{g.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,e,f,g,t,u,y,z){y=null!=y?y:!0;var k=!1,l=null;"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,y),u=!0)),u||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,
-b)+a.substring(a.indexOf(",",b+1))),y&&l.isGridEnabled()&&(c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(k=!0,this.parseFile(null!=u?u: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!=g&&".vssx"==g.toLowerCase().substring(g.length-5)&&(g=g.substring(0,g.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,g))):b=this.importXml(a,c,d,y));null!=t&&t(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,y));k||null==t||t(l);return l};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>>
+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,e,f,g,t,u,x,z){x=null!=x?x:!0;var k=!1,l=null;"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,x),u=!0)),u||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,
+b)+a.substring(a.indexOf(",",b+1))),x&&l.isGridEnabled()&&(c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(k=!0,this.parseFile(null!=u?u: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!=g&&".vssx"==g.toLowerCase().substring(g.length-5)&&(g=g.substring(0,g.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,g))):b=this.importXml(a,c,d,x));null!=t&&t(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x));k||null==t||t(l);return l};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,e,f,g,t,u,y,z,x){var k=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;y=null!=y?y:this.maxImageBytes;u=null!=u?u:!0;var l=this.editor.graph,
-m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,l,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,l,m,k,x)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],r=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=t)t(q);else{var c=[];l.getModel().beginUpdate();
-try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),F=0;F<n;F++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],t=x?null:p.getAttribute("content");null!=t&&
+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,e,f,g,t,u,x,z,y){var k=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;u=null!=u?u:!0;var l=this.editor.graph,
+m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,l,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,l,m,k,y)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],r=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=t)t(q);else{var c=[];l.getModel().beginUpdate();
+try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),F=0;F<n;F++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],t=y?null:p.getAttribute("content");null!=t&&
"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?r(f,mxUtils.bind(this,function(){try{if(l.substring(0,n+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var g=a[0],p=parseFloat(g.getAttribute("width")),r=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox",
-"0 0 "+p+" "+r);else if(isNaN(p)||isNaN(r)){var u=t.split(" ");3<u.length&&(p=parseFloat(u[2]),r=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var y=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,r));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*y)),Math.max(1,Math.round(r*y)),k.name)}}}catch(Q){}return null})):r(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var v=x?null:this.extractGraphModelFromPng(a.target.result);
+"0 0 "+p+" "+r);else if(isNaN(p)||isNaN(r)){var u=t.split(" ");3<u.length&&(p=parseFloat(u[2]),r=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,r));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*v)),Math.max(1,Math.round(r*v)),k.name)}}}catch(Q){}return null})):r(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var v=y?null:this.extractGraphModelFromPng(a.target.result);
if(null!=v&&0<v.length){var A=new Image;A.src=a.target.result;r(f,mxUtils.bind(this,function(){return e(v,"text/xml",b+f*m,c+f*m,A.width,A.height,k.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(g){this.resizeImage(g,
-a.target.result,mxUtils.bind(this,function(g,l,n){r(f,mxUtils.bind(this,function(){if(null!=g&&g.length<y){var p=u&&this.isResampleImage(a.target.result)?Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,d,z)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)?
+a.target.result,mxUtils.bind(this,function(g,l,n){r(f,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var p=u&&this.isResampleImage(a.target.result)?Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,d,z)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)?
e(null,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})},k):"image"==k.type.substring(0,5)?l.readAsDataURL(k):l.readAsText(k)})(F)};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,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),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 v=document.createElement("canvas");v.width=m;v.height=n;var H=v.toDataURL();q!==H&&(b=q,g=m,k=n)}}}catch(E){}c(b,g,k)};EditorUi.prototype.crcTable=[];
+function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),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 v=document.createElement("canvas");v.width=m;v.height=n;var E=v.toDataURL();q!==E&&(b=q,g=m,k=n)}}}catch(H){}c(b,g,k)};EditorUi.prototype.crcTable=[];
for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=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,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(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(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var m=g(a);if("IDAT"==f(a,4)){e=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);e+=k(c.length)+b+c+k(d^4294967295);
e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+m);d=f(a,m);f(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);
-var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.graph.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var c=a.getGlobalVariable;a.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:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=
-c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){var f=function(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.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||a.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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(B){}}),!1);var g=document.createElement("div");g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.contentEditable=!0;mxUtils.setOpacity(g,
-0);g.style.width="1px";g.style.height="1px";g.innerHTML="&nbsp;";var r=!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 c=mxEvent.getSource(b);null==a.container||!a.isEnabled()||a.isMouseDown||a.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||
-r||(g.style.left=a.container.scrollLeft+10+"px",g.style.top=a.container.scrollTop+10+"px",a.container.appendChild(g),r=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){g.focus();document.execCommand("selectAll",!1,null)},0):(g.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!r||224!=c&&17!=c&&91!=c||(r=!1,a.isEditing()||null!=this.dialog||null==a.container||a.container.focus(),
-g.parentNode.removeChild(g))}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(g),f())}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(g,!0),f())}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,g);g.innerHTML="&nbsp;"}),0))}),
-!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==g?!0:t.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.test){d=document.getElementById("geFooter");null!=d&&(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)})),d.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 u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:u.apply(this,arguments)}}d=document.getElementById("geInfo");null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var y=
-null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=y&&(y.parentNode.removeChild(y),y=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){null==y&&(!mxClient.IS_IE||10<document.documentMode)&&(y=this.highlightElement(a.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=y&&(y.parentNode.removeChild(y),
-y=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.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 k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=
-k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=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,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,
-f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};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.insertLucidChart(JSON.parse(d)),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(u){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(u){}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(u){}}}}};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){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(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);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){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=
-0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?
-this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,
-d)});b.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)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};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()?(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"))}))):e())};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)};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.showLayersDialog()):(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(I){}return a}var l=f.data;if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(F){l=null}if(null==l)return;
-if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var m=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?
-mxResources.get(l.titleKey):l.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==l.action){m=null;m="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):k(l.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(F){g.postMessage(JSON.stringify({event:"draft",error:F.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=
-l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,
-r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data=a;g.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);r(a)});if(this.isExportToCanvas()){if(null!=
-this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),G=q.getGlobalVariable,C=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:G.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(C.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,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
-("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=
-this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),
-"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),
-this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
-"12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}l=k(l);c=!0;try{a(l,f)}catch(F){this.handleError(F)}c=!1;null!=
-urlParams.modified&&this.editor.setStatus("");var B=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=B();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=B();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),
-"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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")+" (Ctrl+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,f=null,g="auto",k="auto",u=40,y=40,z=0,x=this.editor.graph;x.getGraphBounds();for(var A=function(){x.setSelectionCells(O);x.scrollCellToVisible(x.getSelectionCell())},v=x.getFreeInsertPoint(),H=v.x,E=v.y,v=E,G=null,C="auto",B=[],F=null,I=null,N=0;N<b.length&&"#"==b[N].charAt(0);){a=b[N];for(N++;N<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[N].substring(1)),N++;if("#"!=a.charAt(1)){var M=a.indexOf(":");
-if(0<M){var U=mxUtils.trim(a.substring(1,M)),P=mxUtils.trim(a.substring(M+1));"label"==U?G=x.sanitizeHtml(P):"style"==U?e=P:"identity"==U&&0<P.length&&"-"!=P?f=P:"width"==U?g=P:"height"==U?k=P:"ignore"==U?I=P.split(","):"connect"==U?B.push(JSON.parse(P)):"link"==U?F=P:"padding"==U?z=parseFloat(P):"edgespacing"==U?u=parseFloat(P):"nodespacing"==U?y=parseFloat(P):"layout"==U&&(C=P)}}}var ba=this.editor.csvToArray(b[N]);a=null;if(null!=f)for(var T=0;T<ba.length;T++)if(f==ba[T]){a=T;break}null==G&&(G=
-"%"+ba[0]+"%");if(null!=B)for(var D=0;D<B.length;D++)null==d[B[D].to]&&(d[B[D].to]={});x.model.beginUpdate();try{for(T=N+1;T<b.length;T++){var ca=this.editor.csvToArray(b[T]);if(ca.length==ba.length){var L=null,J=null!=a?ca[a]:null;null!=J&&(L=x.model.getCell(J));null==L&&(L=new mxCell(G,new mxGeometry(H,v,0,0),e||"whiteSpace=wrap;html=1;"),L.vertex=!0,L.id=J);for(var X=0;X<ca.length;X++)x.setAttributeForCell(L,ba[X],ca[X]);x.setAttributeForCell(L,"placeholders","1");L.style=x.replacePlaceholders(L,
-L.style);for(D=0;D<B.length;D++)d[B[D].to][L.getAttribute(B[D].to)]=L;null!=F&&"link"!=F&&(x.setLinkForCell(L,L.getAttribute(F)),x.setAttributeForCell(L,F,null));var fa=this.editor.graph.getPreferredSizeForCell(L);L.geometry.width="auto"==g?fa.width+z:parseFloat(g);L.geometry.height="auto"==k?fa.height+z:parseFloat(k);v+=L.geometry.height+y;c.push(x.addCell(L))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var K=c.slice(),O=c.slice(),D=0;D<B.length;D++)for(var S=B[D],T=0;T<
-c.length;T++){var L=c[T],Y=L.getAttribute(S.from);if(null!=Y){x.setAttributeForCell(L,S.from,null);for(var aa=Y.split(","),X=0;X<aa.length;X++){var Q=d[S.to][aa[X]];null!=Q&&(O.push(x.insertEdge(null,null,S.label||"",S.invert?Q:L,S.invert?L:Q,S.style||x.createCurrentEdgeStyle())),mxUtils.remove(S.invert?L:Q,K))}}}if(null!=I)for(T=0;T<c.length;T++)for(L=c[T],X=0;X<I.length;X++)x.setAttributeForCell(L,mxUtils.trim(I[X]),null);var W=new mxParallelEdgeLayout(x);W.spacing=u;var Z=function(){W.execute(x.getDefaultParent());
-for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==g&&(b.width=Math.round(x.snap(b.width)));"auto"==k&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==C){var R=new mxCircleLayout(x);R.resetEdges=!1;var V=R.isVertexIgnored;R.isVertexIgnored=function(a){return V.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){R.execute(x.getDefaultParent());Z()},!0,A);A=null}else if("horizontaltree"==C||"verticaltree"==
-C||"auto"==C&&O.length==2*c.length-1&&1==K.length){x.view.validate();var ga=new mxCompactTreeLayout(x,"horizontaltree"==C);ga.levelDistance=y;ga.edgeRouting=!1;this.executeLayout(function(){ga.execute(x.getDefaultParent(),0<K.length?K[0]:null)},!0,A);A=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==K.length){x.view.validate();var da=new mxHierarchicalLayout(x,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);da.intraCellSpacing=y;this.executeLayout(function(){da.execute(x.getDefaultParent(),
-O);x.moveCells(O,H,E)},!0,A);A=null}else if("organic"==C||"auto"==C&&O.length>c.length){x.view.validate();var ha=new mxFastOrganicLayout(x);ha.forceConstant=3*y;ha.resetEdges=!1;var la=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};W=new mxParallelEdgeLayout(x);W.spacing=u;this.executeLayout(function(){ha.execute(x.getDefaultParent());Z()},!0,A);A=null}this.hideDialog()}finally{x.model.endUpdate()}null!=A&&A()}}catch(ma){this.handleError(ma)}};
-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(" "),
+var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.graph.addSvgShadow(a.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 c=a.getGlobalVariable;a.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:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){var f=function(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.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||a.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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(B){}}),!1);var g=document.createElement("div");
+g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.contentEditable=!0;mxUtils.setOpacity(g,0);g.style.width="1px";g.style.height="1px";g.innerHTML="&nbsp;";var r=!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 c=mxEvent.getSource(b);null==a.container||!a.isEnabled()||a.isMouseDown||a.isEditing()||
+null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||r||(g.style.left=a.container.scrollLeft+10+"px",g.style.top=a.container.scrollTop+10+"px",a.container.appendChild(g),r=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){g.focus();document.execCommand("selectAll",!1,null)},0):(g.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=
+b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!r||224!=c&&17!=c&&91!=c||(r=!1,a.isEditing()||null!=this.dialog||null==a.container||a.container.focus(),g.parentNode.removeChild(g))}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(g),f())}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(g,!0),f())}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&
+(g.innerHTML="&nbsp;",g.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,g);g.innerHTML="&nbsp;"}),0))}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==g?!0:t.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.test){d=document.getElementById("geFooter");
+null!=d&&(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)})),d.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 u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:u.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var x=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=x&&(x.parentNode.removeChild(x),x=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){null==x&&(!mxClient.IS_IE||10<document.documentMode)&&(x=this.highlightElement(a.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=x&&(x.parentNode.removeChild(x),x=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.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 k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=
+e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=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,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};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.insertLucidChart(JSON.parse(d)),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(u){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(u){}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(u){}}}}};
+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){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(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);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){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+
+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==
+a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,d)});b.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)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};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()?(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"))}))):e())};
+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)};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.showLayersDialog()):
+(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(I){}return a}var l=f.data;
+if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(F){l=null}if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var m=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=
+a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==l.action){m=null;m="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):k(l.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(F){g.postMessage(JSON.stringify({event:"draft",error:F.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();
+m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):
+null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?
+l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data=a;g.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);
+r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),G=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:G.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(D.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,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=
+this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,
+null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),
+"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),
+mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),
+"*");return}}l=k(l);c=!0;try{a(l,f)}catch(F){this.handleError(F)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var B=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=B();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=B();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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")+" (Ctrl+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,f=null,g="auto",k="auto",u=40,x=40,z=0,y=this.editor.graph;y.getGraphBounds();for(var A=function(){y.setSelectionCells(M);y.scrollCellToVisible(y.getSelectionCell())},v=y.getFreeInsertPoint(),E=v.x,H=v.y,v=H,G=null,D="auto",B=[],F=null,I=null,N=0;N<b.length&&"#"==b[N].charAt(0);){a=b[N];for(N++;N<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[N].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(b[N].substring(1)),N++;if("#"!=a.charAt(1)){var L=a.indexOf(":");if(0<L){var U=mxUtils.trim(a.substring(1,L)),P=mxUtils.trim(a.substring(L+1));"label"==U?G=y.sanitizeHtml(P):"style"==U?e=P:"identity"==U&&0<P.length&&"-"!=P?f=P:"width"==U?g=P:"height"==U?k=P:"ignore"==U?I=P.split(","):"connect"==U?B.push(JSON.parse(P)):"link"==U?F=P:"padding"==U?z=parseFloat(P):"edgespacing"==U?u=parseFloat(P):"nodespacing"==U?x=parseFloat(P):"layout"==U&&(D=P)}}}var aa=this.editor.csvToArray(b[N]);
+a=null;if(null!=f)for(var S=0;S<aa.length;S++)if(f==aa[S]){a=S;break}null==G&&(G="%"+aa[0]+"%");if(null!=B)for(var C=0;C<B.length;C++)null==d[B[C].to]&&(d[B[C].to]={});y.model.beginUpdate();try{for(S=N+1;S<b.length;S++){var W=this.editor.csvToArray(b[S]);if(W.length==aa.length){var K=null,da=null!=a?W[a]:null;null!=da&&(K=y.model.getCell(da));null==K&&(K=new mxCell(G,new mxGeometry(E,v,0,0),e||"whiteSpace=wrap;html=1;"),K.vertex=!0,K.id=da);for(var X=0;X<W.length;X++)y.setAttributeForCell(K,aa[X],
+W[X]);y.setAttributeForCell(K,"placeholders","1");K.style=y.replacePlaceholders(K,K.style);for(C=0;C<B.length;C++)d[B[C].to][K.getAttribute(B[C].to)]=K;null!=F&&"link"!=F&&(y.setLinkForCell(K,K.getAttribute(F)),y.setAttributeForCell(K,F,null));var O=this.editor.graph.getPreferredSizeForCell(K);K.geometry.width="auto"==g?O.width+z:parseFloat(g);K.geometry.height="auto"==k?O.height+z:parseFloat(k);v+=K.geometry.height+x;c.push(y.addCell(K))}}null==e&&y.fireEvent(new mxEventObject("cellsInserted","cells",
+c));for(var J=c.slice(),M=c.slice(),C=0;C<B.length;C++)for(var T=B[C],S=0;S<c.length;S++){var K=c[S],ba=K.getAttribute(T.from);if(null!=ba){y.setAttributeForCell(K,T.from,null);for(var Y=ba.split(","),X=0;X<Y.length;X++){var Q=d[T.to][Y[X]];null!=Q&&(M.push(y.insertEdge(null,null,T.label||"",T.invert?Q:K,T.invert?K:Q,T.style||y.createCurrentEdgeStyle())),mxUtils.remove(T.invert?K:Q,J))}}}if(null!=I)for(S=0;S<c.length;S++)for(K=c[S],X=0;X<I.length;X++)y.setAttributeForCell(K,mxUtils.trim(I[X]),null);
+var Z=new mxParallelEdgeLayout(y);Z.spacing=u;var ca=function(){Z.execute(y.getDefaultParent());for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==g&&(b.width=Math.round(y.snap(b.width)));"auto"==k&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==D){var R=new mxCircleLayout(y);R.resetEdges=!1;var V=R.isVertexIgnored;R.isVertexIgnored=function(a){return V.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){R.execute(y.getDefaultParent());
+ca()},!0,A);A=null}else if("horizontaltree"==D||"verticaltree"==D||"auto"==D&&M.length==2*c.length-1&&1==J.length){y.view.validate();var ga=new mxCompactTreeLayout(y,"horizontaltree"==D);ga.levelDistance=x;ga.edgeRouting=!1;this.executeLayout(function(){ga.execute(y.getDefaultParent(),0<J.length?J[0]:null)},!0,A);A=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==J.length){y.view.validate();var ea=new mxHierarchicalLayout(y,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
+ea.intraCellSpacing=x;this.executeLayout(function(){ea.execute(y.getDefaultParent(),M);y.moveCells(M,E,H)},!0,A);A=null}else if("organic"==D||"auto"==D&&M.length>c.length){y.view.validate();var ha=new mxFastOrganicLayout(y);ha.forceConstant=3*x;ha.resetEdges=!1;var la=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};Z=new mxParallelEdgeLayout(y);Z.spacing=u;this.executeLayout(function(){ha.execute(y.getDefaultParent());ca()},!0,A);A=null}this.hideDialog()}finally{y.model.endUpdate()}null!=
+A&&A()}}catch(ma){this.handleError(ma)}};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};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.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*
@@ -2836,14 +2891,14 @@ null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.back
("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 c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.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);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 d=applicationCache;if(null!=d&&null==this.offlineStatus){var e=function(a){switch(a){case d.UNCACHED:return"";case d.IDLE:return'<img title="Cached" border="0" src="'+
-IMAGE_PATH+'/checkmark.gif"/>';case d.CHECKING:return'<img title="Checking..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.DOWNLOADING:return'<img title="Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.UPDATEREADY:return'<img title="Update ready" border="0" src="'+IMAGE_PATH+'/download.png"/>';case d.OBSOLETE:return'<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';default:return'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}};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);d=window.applicationCache;
-b=mxUtils.bind(this,function(){this.offlineStatus.innerHTML=e(d.status)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").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&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);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.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==
-c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*e/g.view.scale),n=Math.floor(l.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;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,c){this.ui=a;this.page=b;this.previous=c}
+IMAGE_PATH+'/checkmark.gif"/>';case d.CHECKING:return'<img title="Checking/Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.DOWNLOADING:return'<img title="Checking/Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.UPDATEREADY:return'<img title="Update ready" border="0" src="'+IMAGE_PATH+'/download.png"/>';case d.OBSOLETE:return'<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';default:return'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}};
+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"))}));d=window.applicationCache;b=mxUtils.bind(this,function(){var a=e(d.status);this.offlineStatus.innerHTML!=a&&(this.offlineStatus.innerHTML=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",
+b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=
+b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").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&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);
+this.actions.get("createRevision").setEnabled(c);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.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*e/g.view.scale),
+n=Math.floor(l.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;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,c){this.ui=a;this.page=b;this.previous=c}
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,c){this.ui=a;this.oldIndex=b;this.newIndex=c}
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))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,c=b.graph,d=b.graph.compress(c.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=c.getViewState();a.root=c.model.root;c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.rootChanged(a.root);c.setViewState(a.viewState);
@@ -2885,7 +2940,7 @@ EditorUi.prototype.createTabForPage=function(a,b,c){c=this.createTab(c);var d=a.
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var c=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,e=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;e=a==this.currentPage;c.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(c.isEnabled()&&!c.isMouseDown&&(mxEvent.isTouchEvent(f)&&e||mxEvent.isPopupTrigger(f))){c.popupMenuHandler.hideMenu();
this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!d){var g=new mxPopupMenu(this.createPageMenu(a));g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);this.resetCurrentMenu();g.destroy()});var k=mxEvent.getClientX(f),l=mxEvent.getClientY(f);g.popup(k,l,null,f);this.setCurrentMenu(g,b)}mxEvent.consume(f)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(c,d){c.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);c.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);c.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);c.addSeparator(d);c.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
-mxResources.get("copyOf",[a.getName()]))}),d)})};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,c){this.init(a,b,c)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/?client=1";GraphViewer.prototype.editBlankFallbackUrl="https://www.draw.io/?create=drawdata&splash=0";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;
+mxResources.get("copyOf",[a.getName()]))}),d)})};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\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.\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\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\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\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 Work\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\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)\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\ngeneral=General\ngithub=GitHub\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=Descrease 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.\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\nloveApp=I love draw.io\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\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\npublishConfirmation=This will make your diagram public on imgur.com.\npublished=Published\npublishedAt=Published at {1}\npublishing=Publishing\ndeleteUrl=Link to delete: {1}\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\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\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\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\nshowEditButton=Show Edit Button\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\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,c){this.init(a,b,c)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/?client=1";GraphViewer.prototype.editBlankFallbackUrl="https://www.draw.io/?create=drawdata&splash=0";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,c){this.graphConfig=null!=c?c:{};this.autoFit=null!=c["auto-fit"]?c["auto-fit"]:this.autoFit;this.allowZoomIn=null!=c["allow-zoom-in"]?c["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=c["check-visible-state"]?c["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.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&&
@@ -2911,16 +2966,16 @@ c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.background
0);d=null;e=window.setTimeout(mxUtils.bind(this,function(){c.style.display="none";e=null}),100)}),a||200)}),g=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);c.style.display="";mxUtils.setOpacity(c,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(g(30),f())}));mxEvent.addListener(c,mxClient.IS_POINTER?"pointermove":
"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){g(100)}));mxEvent.addListener(c,"mousemove",mxUtils.bind(this,function(a){g(100);mxEvent.consume(a)}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var k=this.graph,l=k.getTolerance();k.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}for(var m=this.toolbarItems,n=0,p=null,q=null,r=0;r<m.length;r++){var t=m[r];if("pages"==t){var u=[],q=b.ownerDocument.createElement("div");
-q.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(q,70);var y=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,u.length);q.innerHTML="";mxUtils.write(q,this.currentPage+1+" / "+u.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(u[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
-"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";c.appendChild(q);var z=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,u.length);q.innerHTML="";mxUtils.write(q,this.currentPage+1+" / "+u.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(u[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");z.style.paddingLeft="0px";z.style.paddingRight=
-"0px";var x=null,t=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)u=[];this.xmlNode!=x&&(u=this.xmlNode.getElementsByTagName("diagram"),q.innerHTML="",mxUtils.write(q,this.currentPage+1+" / "+u.length),x=this.xmlNode);q.style.display=1<u.length?"inline-block":"none";y.style.display=q.style.display;z.style.display=q.style.display});this.addListener("xmlNodeChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+q.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(q,70);var x=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,u.length);q.innerHTML="";mxUtils.write(q,this.currentPage+1+" / "+u.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(u[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
+"Previous Page");x.style.borderRightStyle="none";x.style.paddingLeft="0px";x.style.paddingRight="0px";c.appendChild(q);var z=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,u.length);q.innerHTML="";mxUtils.write(q,this.currentPage+1+" / "+u.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(u[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");z.style.paddingLeft="0px";z.style.paddingRight=
+"0px";var y=null,t=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)u=[];this.xmlNode!=y&&(u=this.xmlNode.getElementsByTagName("diagram"),q.innerHTML="",mxUtils.write(q,this.currentPage+1+" / "+u.length),y=this.xmlNode);q.style.display=1<u.length?"inline-block":"none";x.style.display=q.style.display;z.style.display=q.style.display});this.addListener("xmlNodeChanged",t);t()}else if("zoom"==t)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"==t){if(this.layersEnabled){var A=this.graph.getModel(),v=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=v.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");A.addListener(mxEvent.CHANGE,function(){v.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});v.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
(t=this.graphConfig["toolbar-buttons"][t],null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(m=b.ownerDocument.createElement("div"),m.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;",m.setAttribute("title",this.graphConfig.title),mxUtils.write(m,
-this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var H=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
-b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==H&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
-p=null),b.style.border=H)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
+this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var E=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
+b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
+p=null),b.style.border=E)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,function(c){null!=b&&(c=mxEvent.getSource(c).getAttribute("href"),null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||b.destroy())},mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"&layers=1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://www.draw.io/?client=1&lightbox=1&close=1&edit=_blank"+
a)}else window.drawdata=this.xml,window.open("https://www.draw.io/?client=1&lightbox=1&edit=_blank"+a)}else this.showLocalLightbox()};
@@ -2928,16 +2983,17 @@ GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScro
var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(c.style.position="absolute",c.style.right="32px",c.style.top=a.y+32+"px"):c.style.cssText="position:fixed;top:32px;right:32px;";c.style.cursor="pointer";mxEvent.addListener(c,"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);Graph.prototype.shadowId="dropShadow";d.refresh=function(){};mxEvent.addListener(b,"click",function(){d.destroy()});d.editor.editBlankUrl=this.editBlankUrl;
d.editor.editBlankFallbackUrl=this.editBlankFallbackUrl;var e=d.editor.getEditBlankUrl;d.editor.getEditBlankUrl=function(a,b){var c="";if(null!=d.pages&&null!=d.currentPage){var f=mxUtils.indexOf(d.pages,d.currentPage);0<f&&(c="&page="+f)}return e.apply(this,arguments)+c};var f=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),g=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",f);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow=
-"auto";GraphViewer.resizeSensorEnabled=!0;g.apply(this,arguments)};var k=d.editor.graph,l=k.container;l.style.overflow="hidden";this.lightboxChrome?(l.style.border="1px solid #c0c0c0",l.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(b.style.display="none",c.style.display="none");var m=this;k.getImageFromBundles=function(a){return m.getImageUrl(a)};this.graphConfig.move&&(k.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(l.style,
-"border-radius","4px"),l.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(l.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(l.style,"transition","all .25s ease-in-out"));this.addClickHandler(k,d);window.setTimeout(mxUtils.bind(this,function(){l.style.outline="none";l.style.zIndex=this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(l);document.body.appendChild(c);d.setFileData(this.xml);
-mxUtils.setPrefixedStyle(l.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&&(l.style.position="absolute",l.style.display="block",l.style.left=a.x+"px",l.style.top=a.y+"px",l.style.width=document.body.clientWidth-80+"px",l.style.height=document.body.clientHeight-80+"px",l.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(k,this.graph)}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(c){throw a.innerHTML=c.message,c;}})};
+"auto";GraphViewer.resizeSensorEnabled=!0;g.apply(this,arguments)};var k=d.editor.graph,l=k.container;l.style.overflow="hidden";this.lightboxChrome?(l.style.border="1px solid #c0c0c0",l.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(b.style.display="none",c.style.display="none");var m=this;k.getImageFromBundles=function(a){return m.getImageUrl(a)};var n=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=n.apply(this,arguments);a.getImageFromBundles=function(a){return m.getImageUrl(a)};
+return a};this.graphConfig.move&&(k.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(l.style,"border-radius","4px"),l.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(l.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(l.style,"transition","all .25s ease-in-out"));this.addClickHandler(k,d);window.setTimeout(mxUtils.bind(this,function(){l.style.outline="none";l.style.zIndex=
+this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(l);document.body.appendChild(c);d.setFileData(this.xml);mxUtils.setPrefixedStyle(l.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&&(l.style.position="absolute",l.style.display="block",l.style.left=a.x+"px",l.style.top=
+a.y+"px",l.style.width=document.body.clientWidth-80+"px",l.style.height=document.body.clientHeight-80+"px",l.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(k,this.graph)}),0);return d};
+GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(c){throw a.innerHTML=c.message,c;}})};
GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var c=0;c<b.length;c++)a.push(b[c]);return a}for(var d=document.getElementsByTagName("*"),b=[],c=0;c<d.length;c++){var e=d[c].className;null!=e&&0<e.length&&(e=e.split(" "),0<=mxUtils.indexOf(e,a)&&b.push(d[c]))}return b};
GraphViewer.createViewerForElement=function(a,b){var c=a.getAttribute("data-mxgraph");if(null!=c){var d=JSON.parse(c),e=function(c){c=mxUtils.parseXml(c);c=new GraphViewer(a,c.documentElement,d);null!=b&&b(c)};null!=d.url?GraphViewer.getUrl(d.url,function(a){e(a)}):e(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;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
+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,c){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=c;d.send()}};GraphViewer.resizeSensorEnabled=!0;
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(c,d){function e(){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 f(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function g(b,c){if(!b.resizedAttached)b.resizedAttached=
new e,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"==f(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],g=d.childNodes[0],k=b.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,H,E,G=function(){if((H=b.offsetWidth)!=p||(E=b.offsetHeight)!=q)m=!0,p=H,q=E;l()},C=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",G);C(k,"scroll",G)}var k=function(){GraphViewer.resizeSensorEnabled&&d()},l=Object.prototype.toString.call(c),m="[object Array]"===l||"[object NodeList]"===l||"[object HTMLCollection]"===l||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(m)for(var l=0,n=c.length;l<n;l++)g(c[l],k);else g(c,k);this.detach=function(){if(m)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};
+b.appendChild(b.resizeSensor);"static"==f(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],g=d.childNodes[0],k=b.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,E,H,G=function(){if((E=b.offsetWidth)!=p||(H=b.offsetHeight)!=q)m=!0,p=E,q=H;l()},D=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",G);D(k,"scroll",G)}var k=function(){GraphViewer.resizeSensorEnabled&&d()},l=Object.prototype.toString.call(c),m="[object Array]"===l||"[object NodeList]"===l||"[object HTMLCollection]"===l||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(m)for(var l=0,n=c.length;l<n;l++)g(c[l],k);else g(c,k);this.detach=function(){if(m)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})(); \ No newline at end of file
diff --git a/war/js/atlas.min.js b/war/js/atlas.min.js
index 1f2dfbea..e11ad121 100644
--- a/war/js/atlas.min.js
+++ b/war/js/atlas.min.js
@@ -43,19 +43,19 @@ this.l&&b.push("?",this.l);null!==this.o&&b.push("#",this.o);return b.join("")};
function(){return null!==this.k};f.prototype.V=function(){return this.h&&decodeURIComponent(this.h)};f.prototype.ca=function(b){if(b){b=Number(b);if(b!==(b&65535))throw Error("Bad port number "+b);this.h=""+b}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(b){b?(b=""+b,this.g=!this.k||/^\//.test(b)?b:"/"+b):this.g=null};f.prototype.O=function(b){this.l=b?b:null};f.prototype.aa=function(){return null!==
this.l};f.prototype.ba=function(b){if("object"===typeof b&&!(b instanceof Array)&&(b instanceof Object||"[object Array]"!==Object.prototype.toString.call(b))){var a=[],d=-1,e;for(e in b){var c=b[e];"string"===typeof c&&(a[++d]=e,a[++d]=c)}b=a}for(var a=[],d="",f=0;f<b.length;)e=b[f++],c=b[f++],a.push(d,encodeURIComponent(e.toString())),d="&",c&&a.push("=",encodeURIComponent(c.toString()));this.l=a.join("")};f.prototype.fa=function(b){this.o=b?b:null};f.prototype.Z=function(){return null!==this.o};
var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,n=/[#\/\?@]/g,p=/[\#\?]/g;f.parse=b;f.create=function(b,e,c,g,k,l,m){b=new f(a(b,n),a(e,n),"string"==typeof c?encodeURIComponent(c):null,0<g?g.toString():null,a(k,p),null,"string"==typeof m?encodeURIComponent(m):null);l&&("string"===typeof l?b.O(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):b.ba(l));return b};f.N=c;f.ma=e;f.ha={ua:function(a){return/\.html$/.test(b(a).U())?"text/html":"application/javascript"},
-N:function(a,d){return a?c(b(a),b(d)).toString():""+d}};return f}();"undefined"!==typeof window&&(window.URI=e);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(b){return"string"===typeof b?'url("'+b.replace(y,d)+'")':'url("about:blank")'}function d(b){return B[b]}function f(b,a){return b?e.ha.N(b,a):a}function p(b,a,d){if(!d)return null;var e=(""+b).match(A);return!e||e[1]&&!C.test(e[1])?null:d(b,a)}function z(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
-"")}var y=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},A=/^(?:([^:/?# ]+):)?/,C=/^(?:https?|mailto|data)$/i;g=function(){var d={};return function H(e,g,k,l,m){e=z(e);var n=c[e];if(n&&"object"===typeof n){for(var q=n.cssPropBits,t=q&80,v=q&1536,u=NaN,x=0,D=0;x<g.length;++x){var y=g[x].toLowerCase(),A=y.charCodeAt(0),B,C,F,J,E,I;if(32===A)y="";else if(34===A)y=16===t?k?a(p(f(l,b(g[x].substring(1,y.length-1))),e,k)):"":
-q&8&&!(t&t-1)?y:"";else if("inherit"!==y){if(E=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var Q=E.length;0<=--Q;)for(var Z=E[Q],M=Z.length;0<=--M;)L[Z[M]]=d;L=n.cssLitMap=L}E=L}else E=d;if(I=E,I[z(y)]!==d)if(35===A&&/^#(?:[0-9a-f]{3}){1,2}$/.test(y))y=q&2?y:"";else if(48<=A&&57>=A)y=q&1?y:"";else if(B=y.charCodeAt(1),C=y.charCodeAt(2),F=48<=B&&57>=B,J=48<=C&&57>=C,43===A&&(F||46===B&&J))y=q&1?(F?"":"0")+y.substring(1):"";else if(45===A&&(F||46===B&&J))y=q&4?(F?"-":"-0")+y.substring(1):q&1?
-"0":"";else if(46===A&&F)y=q&1?"0"+y:"";else if('url("'===y.substring(0,5))y=k&&q&16?a(p(f(l,g[x].substring(5,y.length-2)),e,k)):"";else if("("===y.charAt(y.length-1))a:{E=g;L=x;y=1;Q=L+1;for(A=E.length;Q<A&&y;)Z=E[Q++],y+=")"===Z?-1:/^[^"']*\($/.test(Z);if(!y)for(y=E[L].toLowerCase(),A=z(y),E=E.splice(L,Q-L,""),L=n.cssFns,Q=0,Z=L.length;Q<Z;++Q)if(L[Q].substring(0,A.length)==A){E[0]=E[E.length-1]="";H(L[Q],E,k,l);y=y+E.join(" ")+")";break a}y=""}else y=v&&/^-?[a-z_][\w\-]*$/.test(y)&&!/__$/.test(y)?
-m&&512===v?g[x]+m:1024===v&&c[y]&&"number"===typeof c[y].oa?y:"":/^\w+$/.test(y)&&64===t&&q&8?u+1===D?(g[u]=g[u].substring(0,g[u].length-1)+" "+y+'"',""):(u=D,'"'+y+'"'):""}y&&(g[D++]=y)}1===D&&'url("about:blank")'===g[0]&&(D=0);g.length=D}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)$/,
+N:function(a,d){return a?c(b(a),b(d)).toString():""+d}};return f}();"undefined"!==typeof window&&(window.URI=e);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(b){return"string"===typeof b?'url("'+b.replace(A,d)+'")':'url("about:blank")'}function d(b){return B[b]}function f(b,a){return b?e.ha.N(b,a):a}function p(b,a,d){if(!d)return null;var e=(""+b).match(z);return!e||e[1]&&!C.test(e[1])?null:d(b,a)}function y(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
+"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},z=/^(?:([^:/?# ]+):)?/,C=/^(?:https?|mailto|data)$/i;g=function(){var d={};return function H(e,g,k,l,m){e=y(e);var n=c[e];if(n&&"object"===typeof n){for(var q=n.cssPropBits,t=q&80,v=q&1536,u=NaN,x=0,z=0;x<g.length;++x){var D=g[x].toLowerCase(),A=D.charCodeAt(0),B,C,F,J,E,I;if(32===A)D="";else if(34===A)D=16===t?k?a(p(f(l,b(g[x].substring(1,D.length-1))),e,k)):"":
+q&8&&!(t&t-1)?D:"";else if("inherit"!==D){if(E=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var Q=E.length;0<=--Q;)for(var aa=E[Q],M=aa.length;0<=--M;)L[aa[M]]=d;L=n.cssLitMap=L}E=L}else E=d;if(I=E,I[y(D)]!==d)if(35===A&&/^#(?:[0-9a-f]{3}){1,2}$/.test(D))D=q&2?D:"";else if(48<=A&&57>=A)D=q&1?D:"";else if(B=D.charCodeAt(1),C=D.charCodeAt(2),F=48<=B&&57>=B,J=48<=C&&57>=C,43===A&&(F||46===B&&J))D=q&1?(F?"":"0")+D.substring(1):"";else if(45===A&&(F||46===B&&J))D=q&4?(F?"-":"-0")+D.substring(1):
+q&1?"0":"";else if(46===A&&F)D=q&1?"0"+D:"";else if('url("'===D.substring(0,5))D=k&&q&16?a(p(f(l,g[x].substring(5,D.length-2)),e,k)):"";else if("("===D.charAt(D.length-1))a:{E=g;L=x;D=1;Q=L+1;for(A=E.length;Q<A&&D;)aa=E[Q++],D+=")"===aa?-1:/^[^"']*\($/.test(aa);if(!D)for(D=E[L].toLowerCase(),A=y(D),E=E.splice(L,Q-L,""),L=n.cssFns,Q=0,aa=L.length;Q<aa;++Q)if(L[Q].substring(0,A.length)==A){E[0]=E[E.length-1]="";H(L[Q],E,k,l);D=D+E.join(" ")+")";break a}D=""}else D=v&&/^-?[a-z_][\w\-]*$/.test(D)&&!/__$/.test(D)?
+m&&512===v?g[x]+m:1024===v&&c[D]&&"number"===typeof c[D].oa?D:"":/^\w+$/.test(D)&&64===t&&q&8?u+1===z?(g[u]=g[u].substring(0,g[u].length-1)+" "+D+'"',""):(u=z,'"'+D+'"'):""}D&&(g[z++]=D)}1===z&&'url("about:blank")'===g[0]&&(z=0);g.length=z}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)$/,
F={};F[">"]=F["+"]=F["~"]=F;k=function(b,a,d){function e(e,l){function m(d,e,c){var k,l,m,p,t,v=!0;k="";d<e&&((t=b[d],"*"===t)?(++d,k=t):/^[a-zA-Z]/.test(t)&&(l=g(t.toLowerCase(),[]))&&("tagName"in l&&(t=l.tagName),++d,k=t));for(p=m=l="";v&&d<e;++d)if(t=b[d],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?v=!1:l+=t+f;else if("."===t)++d<e&&/^[0-9A-Za-z:_\-]+$/.test(t=b[d])&&!/^_|__$/.test(t)?l+="."+t:v=!1;else if(d+1<e&&"["===b[d]){++d;var u=b[d++].toLowerCase();t=q.m[k+"::"+u];t!==+t&&(t=q.m["*::"+
-u]);var x;a.ia?(x=a.ia(k,u),"string"!==typeof x&&(v=!1,x=u),v&&t!==+t&&(t=q.d.NONE)):(x=u,t!==+t&&(v=!1));var z=u="",H=!1;/^[~^$*|]?=$/.test(b[d])&&(u=b[d++],z=b[d++],/^[0-9A-Za-z:_\-]+$/.test(z)?z='"'+z+'"':"]"===z&&(z='""',--d),/^"([^\"\\]|\\.)*"$/.test(z)||(v=!1),(H="i"===b[d])&&++d);"]"!==b[d]&&(++d,v=!1);switch(t){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==u&&"~="!==u&&"$="!==u||'""'==z||H?"|="===u||""===u||(v=!1):z='"'+z.substring(1,
-z.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==u&&(v=!1);break;default:v=!1}v&&(m+="["+x.replace(/[^\w-]/g,"\\$&")+u+z+(H?" i]":"]"))}else if(d<e&&":"===b[d])if(t=b[++d],E.test(t))p+=":"+t;else break;else break;d!==e&&(v=!1);v&&(d=(k+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+c)&&n.push(d);return v}" "===b[e]&&++e;l-1!==e&&" "===b[l]&&--l;for(var n=[],p=e,t=!0,v=e;t&&v<l;++v){var u=b[v];if(F[u]===F||" "===u)m(p,v,u)?p=v+1:t=!1}m(p,l,"")||(t=!1);return t?(n.length&&(p=n.join(""),null!==
+u]);var x;a.ia?(x=a.ia(k,u),"string"!==typeof x&&(v=!1,x=u),v&&t!==+t&&(t=q.d.NONE)):(x=u,t!==+t&&(v=!1));var y=u="",H=!1;/^[~^$*|]?=$/.test(b[d])&&(u=b[d++],y=b[d++],/^[0-9A-Za-z:_\-]+$/.test(y)?y='"'+y+'"':"]"===y&&(y='""',--d),/^"([^\"\\]|\\.)*"$/.test(y)||(v=!1),(H="i"===b[d])&&++d);"]"!==b[d]&&(++d,v=!1);switch(t){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==u&&"~="!==u&&"$="!==u||'""'==y||H?"|="===u||""===u||(v=!1):y='"'+y.substring(1,
+y.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==u&&(v=!1);break;default:v=!1}v&&(m+="["+x.replace(/[^\w-]/g,"\\$&")+u+y+(H?" i]":"]"))}else if(d<e&&":"===b[d])if(t=b[++d],E.test(t))p+=":"+t;else break;else break;d!==e&&(v=!1);v&&(d=(k+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+c)&&n.push(d);return v}" "===b[e]&&++e;l-1!==e&&" "===b[l]&&--l;for(var n=[],p=e,t=!0,v=e;t&&v<l;++v){var u=b[v];if(F[u]===F||" "===u)m(p,v,u)?p=v+1:t=!1}m(p,l,"")||(t=!1);return t?(n.length&&(p=n.join(""),null!==
c&&(p="."+c+" "+p),k.push(p)),!0):!d||d(b.slice(e,l))}var c=a.na,f=a.L,g=a.Aa,k=[],l=0,m,n=0,p;for(m=0;m<b.length;++m)(p=b[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==b[m]&&(n||F[b[m-1]]===F||F[b[m+1]]===F))||(b[l++]=b[m]);b.length=l;l=b.length;for(m=n=0;m<l;++m)if(","===b[m]){if(!e(n,m))return null;n=m+1}return e(n,l)?k:null};(function(){var b=/^\w/,a=/^(?:(?:(?:(?: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;
-m=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return d.length?a.test(d)?b.test(d)?d:"not all , "+d:"not all":""}})();(function(){function b(b){var a=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,e=/^\s*url\s*[(][']([^']*)['][)]\s*$/,c=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(b))||(f=a.exec(b))||(f=d.exec(b))||(f=e.exec(b))||(f=c.exec(b))?f[1]:null}function a(d,e,c,l,q,t,v){function u(){y=
-H.length&&null===H[H.length-1]}var x=void 0,z=v||[0],H=[],y=!1;n(e,{startStylesheet:function(){x=[]},endStylesheet:function(){},startAtrule:function(e,g){if(y)e=null;else if("@media"===e)x.push("@media"," ",m(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var k=g[0];1!==g.length||/__$|[^\w\-]/.test(k)?e=null:(x.push(e," ",k+c.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof t){var n=m(g.slice(1));if("not all"!==n){++z[0];var v=[];x.push(v);var u=p(f(d,b(g[0])),
-function(b){var d=a(u,b.qa,c,l,q,t,z);--z[0];b=n?{toString:function(){return"@media "+n+" {"+d.result+"}"}}:d.result;v[0]=b;t(b,!!z[0])},q)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");y=!e;H.push(e)},endAtrule:function(){H.pop();y||x.push(";");u()},startBlock:function(){y||x.push("{")},endBlock:function(){y||(x.push("}"),y=!0)},startRuleset:function(b){if(!y){var a=void 0;"@keyframes"===H[H.length-1]?(a=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-y=!a,a&&(a=a[0].replace(/ +/g,""))):(b=k(b,c),b&&b.length?a=b.join(", "):y=!0);y||x.push(a,"{")}H.push(null)},endRuleset:function(){H.pop();y||x.push("}");u()},declaration:function(b,a){if(!y){var e=!1,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=!0,a.length-=2);g(b,a,l,d,c.L);a.length&&x.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return x.join("")}},va:!!z[0]}}l=function(b,d,e,c){return a(b,d,e,c,void 0,void 0).result.toString()}})()})();
+m=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return d.length?a.test(d)?b.test(d)?d:"not all , "+d:"not all":""}})();(function(){function b(b){var a=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,e=/^\s*url\s*[(][']([^']*)['][)]\s*$/,c=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(b))||(f=a.exec(b))||(f=d.exec(b))||(f=e.exec(b))||(f=c.exec(b))?f[1]:null}function a(d,e,c,l,q,t,v){function u(){z=
+H.length&&null===H[H.length-1]}var x=void 0,y=v||[0],H=[],z=!1;n(e,{startStylesheet:function(){x=[]},endStylesheet:function(){},startAtrule:function(e,g){if(z)e=null;else if("@media"===e)x.push("@media"," ",m(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var k=g[0];1!==g.length||/__$|[^\w\-]/.test(k)?e=null:(x.push(e," ",k+c.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof t){var n=m(g.slice(1));if("not all"!==n){++y[0];var v=[];x.push(v);var u=p(f(d,b(g[0])),
+function(b){var d=a(u,b.qa,c,l,q,t,y);--y[0];b=n?{toString:function(){return"@media "+n+" {"+d.result+"}"}}:d.result;v[0]=b;t(b,!!y[0])},q)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");z=!e;H.push(e)},endAtrule:function(){H.pop();z||x.push(";");u()},startBlock:function(){z||x.push("{")},endBlock:function(){z||(x.push("}"),z=!0)},startRuleset:function(b){if(!z){var a=void 0;"@keyframes"===H[H.length-1]?(a=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+z=!a,a&&(a=a[0].replace(/ +/g,""))):(b=k(b,c),b&&b.length?a=b.join(", "):z=!0);z||x.push(a,"{")}H.push(null)},endRuleset:function(){H.pop();z||x.push("}");u()},declaration:function(b,a){if(!z){var e=!1,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=!0,a.length-=2);g(b,a,l,d,c.L);a.length&&x.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return x.join("")}},va:!!y[0]}}l=function(b,d,e,c){return a(b,d,e,c,void 0,void 0).result.toString()}})()})();
"undefined"!==typeof window&&(window.sanitizeCssProperty=g,window.sanitizeCssSelectorList=k,window.sanitizeStylesheet=l,window.sanitizeMediaQuery=m);var n,p;(function(){function b(b,d,e,c,f){for(var g=d++;d<e&&"{"!==b[d]&&";"!==b[d];)++d;if(d<e&&(f||";"===b[d])){f=g+1;var k=d;f<e&&" "===b[f]&&++f;k>f&&" "===b[k-1]&&--k;c.startAtrule&&c.startAtrule(b[g].toLowerCase(),b.slice(f,k));d="{"===b[d]?a(b,d,e,c):d+1;c.endAtrule&&c.endAtrule()}return d}function a(d,c,f,g){++c;for(g.startBlock&&g.startBlock();c<
f;){var k=d[c].charAt(0);if("}"==k){++c;break}c=" "===k||";"===k?c+1:"@"===k?b(d,c,f,g,!1):"{"===k?a(d,c,f,g):e(d,c,f,g)}g.endBlock&&g.endBlock();return c}function e(b,a,d,e){var f=a,k=c(b,a,d,!0);if(0>k)return k=~k,k===f?k+1:k;var l=b[k];if("{"!==l)return k===f?k+1:k;a=k+1;k>f&&" "===b[k-1]&&--k;for(e.startRuleset&&e.startRuleset(b.slice(f,k));a<d;){l=b[a];if("}"===l){++a;break}a=" "===l?a+1:g(b,a,d,e)}e.endRuleset&&e.endRuleset();return a}function c(b,a,d,e){for(var c,f=[],g=-1;a<d;++a)if(c=b[a].charAt(0),
"["===c||"("===c)f[++g]=c;else if("]"===c&&"["===f[g]||")"===c&&"("===f[g])--g;else if("{"===c||"}"===c||";"===c||"@"===c||":"===c&&!e)break;0<=g&&(a=~(a+1));return a}function f(b,a,d){for(;a<d&&";"!==b[a]&&"}"!==b[a];)++a;return a<d&&";"===b[a]?a+1:a}function g(b,a,d,e){var g=b[a++];if(!k.test(g))return f(b,a,d);a<d&&" "===b[a]&&++a;if(a==d||":"!==b[a])return f(b,a,d);++a;a<d&&" "===b[a]&&++a;var l=c(b,a,d,!1);if(0>l)l=~l;else{for(var m=[],n=0,p=a;p<l;++p)a=b[p]," "!==a&&(m[n++]=a);if(l<d){do{a=
@@ -79,21 +79,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"};q.ELEMENT_DOM_INTERFACES=q.Q;q.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};q.ueffects=q.P;q.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};
-q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(b){function a(b,a){var d;if(W.hasOwnProperty(a))d=W[a];else{var e=a.match(O);d=e?String.fromCharCode(parseInt(e[1],10)):(e=a.match(G))?String.fromCharCode(parseInt(e[1],
-16)):N&&X.test(a)?(N.innerHTML="&"+a+";",e=N.textContent,W[a]=e):"&"+a+";"}return d}function d(b){return b.replace(Y,a)}function c(b){return(""+b).replace(P,"&amp;").replace(V,"&lt;").replace(ea,"&gt;").replace(ba,"&#34;")}function f(b){return b.replace(S,"&amp;$1").replace(V,"&lt;").replace(ea,"&gt;")}function g(b){var a={z:b.z||b.cdata,A:b.A||b.comment,B:b.B||b.endDoc,t:b.t||b.endTag,e:b.e||b.pcdata,F:b.F||b.rcdata,H:b.H||b.startDoc,w:b.w||b.startTag};return function(b,d){var e,c=/(<\/|<\!--|<[!?]|[&<>])/g;
-e=b+"";if(aa)e=e.split(c);else{for(var f=[],g=0,k;null!==(k=c.exec(e));)f.push(e.substring(g,k.index)),f.push(k[0]),g=k.index+k[0].length;f.push(e.substring(g));e=f}l(a,e,0,{r:!1,C:!1},d)}}function k(b,a,d,e,c){return function(){l(b,a,d,e,c)}}function l(a,d,e,c,f){try{a.H&&0==e&&a.H(f);for(var g,l,p,q=d.length;e<q;){var t=d[e++],v=d[e];switch(t){case "&":R.test(v)?(a.e&&a.e("&"+v,f,U,k(a,d,e,c,f)),e++):a.e&&a.e("&amp;",f,U,k(a,d,e,c,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(v))if(g[0].length===
-v.length&&">"===d[e+1])e+=2,p=g[1].toLowerCase(),a.t&&a.t(p,f,U,k(a,d,e,c,f));else{var u=d,x=e,z=a,y=f,H=U,A=c,B=n(u,x);B?(z.t&&z.t(B.name,y,H,k(z,u,x,A,y)),e=B.next):e=u.length}else a.e&&a.e("&lt;/",f,U,k(a,d,e,c,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(v))if(g[0].length===v.length&&">"===d[e+1]){e+=2;p=g[1].toLowerCase();a.w&&a.w(p,[],f,U,k(a,d,e,c,f));var D=b.f[p];D&ca&&(e=m(d,{name:p,next:e,c:D},a,f,U,c))}else{var u=d,x=a,z=f,y=U,H=c,G=n(u,e);G?(x.w&&x.w(G.name,G.R,z,y,k(x,u,G.next,H,z)),
-e=G.c&ca?m(u,G,x,z,y,H):G.next):e=u.length}else a.e&&a.e("&lt;",f,U,k(a,d,e,c,f));break;case "\x3c!--":if(!c.C){for(l=e+1;l<q&&(">"!==d[l]||!/--$/.test(d[l-1]));l++);if(l<q){if(a.A){var N=d.slice(e,l).join("");a.A(N.substr(0,N.length-2),f,U,k(a,d,l+1,c,f))}e=l+1}else c.C=!0}c.C&&a.e&&a.e("&lt;!--",f,U,k(a,d,e,c,f));break;case "<!":if(/^\w/.test(v)){if(!c.r){for(l=e+1;l<q&&">"!==d[l];l++);l<q?e=l+1:c.r=!0}c.r&&a.e&&a.e("&lt;!",f,U,k(a,d,e,c,f))}else a.e&&a.e("&lt;!",f,U,k(a,d,e,c,f));break;case "<?":if(!c.r){for(l=
-e+1;l<q&&">"!==d[l];l++);l<q?e=l+1:c.r=!0}c.r&&a.e&&a.e("&lt;?",f,U,k(a,d,e,c,f));break;case ">":a.e&&a.e("&gt;",f,U,k(a,d,e,c,f));break;case "":break;default:a.e&&a.e(t,f,U,k(a,d,e,c,f))}}a.B&&a.B(f)}catch(ga){if(ga!==U)throw ga;}}function m(a,d,e,c,g,l){var m=a.length;Z.hasOwnProperty(d.name)||(Z[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=Z[d.name],p=d.next,q=d.next+1;q<m&&("</"!==a[q-1]||!n.test(a[q]));q++);q<m&&--q;m=a.slice(p,q).join("");if(d.c&b.c.CDATA)e.z&&e.z(m,c,g,k(e,a,
-q,l,c));else if(d.c&b.c.RCDATA)e.F&&e.F(f(m),c,g,k(e,a,q,l,c));else throw Error("bug");return q}function n(a,e){var c=/^([-\w:]+)/.exec(a[e]),f={};f.name=c[1].toLowerCase();f.c=b.f[f.name];for(var g=a[e].substr(c[0].length),k=e+1,l=a.length;k<l&&">"!==a[k];k++)g+=a[k];if(!(l<=k)){for(var m=[];""!==g;)if(c=T.exec(g))if(c[4]&&!c[5]||c[6]&&!c[7]){for(var c=c[4]||c[6],n=!1,g=[g,a[k++]];k<l;k++){if(n){if(">"===a[k])break}else 0<=a[k].indexOf(c)&&(n=!0);g.push(a[k])}if(l<=k)break;g=g.join("")}else{var n=
-c[1].toLowerCase(),p;if(c[2]){p=c[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=d(p.replace(da,""))}else p="";m.push(n,p);g=g.substr(c[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=k+1;return f}}function p(a){function d(b,a){f||a.push(b)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(d,g,k){if(!f&&b.f.hasOwnProperty(d)){var l=b.f[d];if(!(l&b.c.FOLDABLE)){var m=a(d,g);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
+q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(b){function a(b,a){var d;if(X.hasOwnProperty(a))d=X[a];else{var e=a.match(N);d=e?String.fromCharCode(parseInt(e[1],10)):(e=a.match(G))?String.fromCharCode(parseInt(e[1],
+16)):O&&W.test(a)?(O.innerHTML="&"+a+";",e=O.textContent,X[a]=e):"&"+a+";"}return d}function d(b){return b.replace(Y,a)}function c(b){return(""+b).replace(P,"&amp;").replace(V,"&lt;").replace(da,"&gt;").replace(Z,"&#34;")}function f(b){return b.replace(R,"&amp;$1").replace(V,"&lt;").replace(da,"&gt;")}function g(b){var a={z:b.z||b.cdata,A:b.A||b.comment,B:b.B||b.endDoc,t:b.t||b.endTag,e:b.e||b.pcdata,F:b.F||b.rcdata,H:b.H||b.startDoc,w:b.w||b.startTag};return function(b,d){var e,c=/(<\/|<\!--|<[!?]|[&<>])/g;
+e=b+"";if(ba)e=e.split(c);else{for(var f=[],g=0,k;null!==(k=c.exec(e));)f.push(e.substring(g,k.index)),f.push(k[0]),g=k.index+k[0].length;f.push(e.substring(g));e=f}l(a,e,0,{r:!1,C:!1},d)}}function k(b,a,d,e,c){return function(){l(b,a,d,e,c)}}function l(a,d,e,c,f){try{a.H&&0==e&&a.H(f);for(var g,l,p,q=d.length;e<q;){var t=d[e++],v=d[e];switch(t){case "&":S.test(v)?(a.e&&a.e("&"+v,f,U,k(a,d,e,c,f)),e++):a.e&&a.e("&amp;",f,U,k(a,d,e,c,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(v))if(g[0].length===
+v.length&&">"===d[e+1])e+=2,p=g[1].toLowerCase(),a.t&&a.t(p,f,U,k(a,d,e,c,f));else{var u=d,x=e,y=a,H=f,z=U,A=c,D=n(u,x);D?(y.t&&y.t(D.name,H,z,k(y,u,x,A,H)),e=D.next):e=u.length}else a.e&&a.e("&lt;/",f,U,k(a,d,e,c,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(v))if(g[0].length===v.length&&">"===d[e+1]){e+=2;p=g[1].toLowerCase();a.w&&a.w(p,[],f,U,k(a,d,e,c,f));var B=b.f[p];B&ea&&(e=m(d,{name:p,next:e,c:B},a,f,U,c))}else{var u=d,x=a,y=f,H=U,z=c,G=n(u,e);G?(x.w&&x.w(G.name,G.R,y,H,k(x,u,G.next,z,y)),
+e=G.c&ea?m(u,G,x,y,H,z):G.next):e=u.length}else a.e&&a.e("&lt;",f,U,k(a,d,e,c,f));break;case "\x3c!--":if(!c.C){for(l=e+1;l<q&&(">"!==d[l]||!/--$/.test(d[l-1]));l++);if(l<q){if(a.A){var F=d.slice(e,l).join("");a.A(F.substr(0,F.length-2),f,U,k(a,d,l+1,c,f))}e=l+1}else c.C=!0}c.C&&a.e&&a.e("&lt;!--",f,U,k(a,d,e,c,f));break;case "<!":if(/^\w/.test(v)){if(!c.r){for(l=e+1;l<q&&">"!==d[l];l++);l<q?e=l+1:c.r=!0}c.r&&a.e&&a.e("&lt;!",f,U,k(a,d,e,c,f))}else a.e&&a.e("&lt;!",f,U,k(a,d,e,c,f));break;case "<?":if(!c.r){for(l=
+e+1;l<q&&">"!==d[l];l++);l<q?e=l+1:c.r=!0}c.r&&a.e&&a.e("&lt;?",f,U,k(a,d,e,c,f));break;case ">":a.e&&a.e("&gt;",f,U,k(a,d,e,c,f));break;case "":break;default:a.e&&a.e(t,f,U,k(a,d,e,c,f))}}a.B&&a.B(f)}catch(ga){if(ga!==U)throw ga;}}function m(a,d,e,c,g,l){var m=a.length;aa.hasOwnProperty(d.name)||(aa[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=aa[d.name],p=d.next,q=d.next+1;q<m&&("</"!==a[q-1]||!n.test(a[q]));q++);q<m&&--q;m=a.slice(p,q).join("");if(d.c&b.c.CDATA)e.z&&e.z(m,c,g,k(e,
+a,q,l,c));else if(d.c&b.c.RCDATA)e.F&&e.F(f(m),c,g,k(e,a,q,l,c));else throw Error("bug");return q}function n(a,e){var c=/^([-\w:]+)/.exec(a[e]),f={};f.name=c[1].toLowerCase();f.c=b.f[f.name];for(var g=a[e].substr(c[0].length),k=e+1,l=a.length;k<l&&">"!==a[k];k++)g+=a[k];if(!(l<=k)){for(var m=[];""!==g;)if(c=T.exec(g))if(c[4]&&!c[5]||c[6]&&!c[7]){for(var c=c[4]||c[6],n=!1,g=[g,a[k++]];k<l;k++){if(n){if(">"===a[k])break}else 0<=a[k].indexOf(c)&&(n=!0);g.push(a[k])}if(l<=k)break;g=g.join("")}else{var n=
+c[1].toLowerCase(),p;if(c[2]){p=c[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=d(p.replace(ca,""))}else p="";m.push(n,p);g=g.substr(c[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=k+1;return f}}function p(a){function d(b,a){f||a.push(b)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(d,g,k){if(!f&&b.f.hasOwnProperty(d)){var l=b.f[d];if(!(l&b.c.FOLDABLE)){var m=a(d,g);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
if("attribs"in m)g=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=b.f[n]):(n=d,m=l);if(l&b.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===d&&(p.v!==n||d!==n)&&k.push("</",p.v,">")}l&b.c.EMPTY||e.push({D:d,v:n});k.push("<",n);d=0;for(p=g.length;d<p;d+=2){var q=g[d],t=g[d+1];null!==t&&void 0!==t&&k.push(" ",q,'="',c(t),'"')}k.push(">");l&b.c.EMPTY&&!(m&b.c.EMPTY)&&k.push("</",n,">")}else f=!(l&b.c.EMPTY)}}},endTag:function(a,d){if(f)f=!1;else if(b.f.hasOwnProperty(a)){var c=
b.f[a];if(!(c&(b.c.EMPTY|b.c.FOLDABLE))){if(c&b.c.OPTIONAL_ENDTAG)for(c=e.length;0<=--c;){var g=e[c].D;if(g===a)break;if(!(b.f[g]&b.c.OPTIONAL_ENDTAG))return}else for(c=e.length;0<=--c&&e[c].D!==a;);if(!(0>c)){for(g=e.length;--g>c;){var k=e[g].v;b.f[k]&b.c.OPTIONAL_ENDTAG||d.push("</",k,">")}c<e.length&&(a=e[c].v);e.length=c;d.push("</",a,">")}}}},pcdata:d,rcdata:d,cdata:d,endDoc:function(b){for(;e.length;e.length--)b.push("</",e[e.length-1].v,">")}})}function q(b,a,d,c,f){if(!f)return null;try{var g=
e.parse(""+b);if(g&&(!g.K()||ha.test(g.W()))){var k=f(g,a,d,c);return k?k.toString():null}}catch(na){}return null}function t(b,a,d,e,c){d||b(a+" removed",{S:"removed",tagName:a});if(e!==c){var f="changed";e&&!c?f="removed":!e&&c&&(f="added");b(a+"."+d+" "+f,{S:f,tagName:a,la:d,oldValue:e,newValue:c})}}function H(b,a,d){a=a+"::"+d;if(b.hasOwnProperty(a))return b[a];a="*::"+d;if(b.hasOwnProperty(a))return b[a]}function J(a,d,e,c,f){for(var g=0;g<d.length;g+=2){var k=d[g],l=d[g+1],m=l,n=null,p;if((p=
a+"::"+k,b.m.hasOwnProperty(p))||(p="*::"+k,b.m.hasOwnProperty(p)))n=b.m[p];if(null!==n)switch(n){case b.d.NONE:break;case b.d.SCRIPT:l=null;f&&t(f,a,k,m,l);break;case b.d.STYLE:if("undefined"===typeof M){l=null;f&&t(f,a,k,m,l);break}var v=[];M(l,{declaration:function(a,d){var c=a.toLowerCase();Q(c,d,e?function(a){return q(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:c},e)}:null);d.length&&v.push(c+": "+d.join(" "))}});l=0<v.length?v.join(" ; "):null;f&&t(f,a,k,m,l);break;case b.d.ID:case b.d.IDREF:case b.d.IDREFS:case b.d.GLOBAL_NAME:case b.d.LOCAL_NAME:case b.d.CLASSES:l=
c?c(l):l;f&&t(f,a,k,m,l);break;case b.d.URI:l=q(l,H(b.J,a,k),H(b.I,a,k),{TYPE:"MARKUP",XML_ATTR:k,XML_TAG:a},e);f&&t(f,a,k,m,l);break;case b.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=c?c(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&t(f,a,k,m,l);break;default:l=null,f&&t(f,a,k,m,l)}else l=null,f&&t(f,a,k,m,l);d[g+1]=l}return d}function I(a,d,e){return function(c,f){if(b.f[c]&b.c.UNSAFE)e&&t(e,c,void 0,void 0,void 0);else return{attribs:J(c,f,a,d,e)}}}function L(b,a){var d=[];p(a)(b,
-d);return d.join("")}var M,Q;"undefined"!==typeof window&&(M=window.parseCssDeclarations,Q=window.sanitizeCssProperty);var W={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},O=/^#(\d+)$/,G=/^#x([0-9A-Fa-f]+)$/,X=/^[A-Za-z][A-za-z0-9]+$/,N="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,da=/\0/g,Y=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,R=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,P=/&/g,S=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,V=
-/[<]/g,ea=/>/g,ba=/\"/g,T=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,aa=3==="a,b".split(/(,)/).length,ca=b.c.CDATA|b.c.RCDATA,U={},Z={},ha=/^(?:https?|mailto|data)$/i,fa={};fa.pa=fa.escapeAttrib=c;fa.ra=fa.makeHtmlSanitizer=p;fa.sa=fa.makeSaxParser=g;fa.ta=fa.makeTagPolicy=I;fa.wa=fa.normalizeRCData=f;fa.xa=fa.sanitize=function(b,a,d,e){return L(b,I(a,d,e))};fa.ya=fa.sanitizeAttribs=J;fa.za=fa.sanitizeWithPolicy=L;fa.Ba=fa.unescapeEntities=d;return fa}(q);
+d);return d.join("")}var M,Q;"undefined"!==typeof window&&(M=window.parseCssDeclarations,Q=window.sanitizeCssProperty);var X={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},N=/^#(\d+)$/,G=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,O="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,ca=/\0/g,Y=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,S=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,P=/&/g,R=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,V=
+/[<]/g,da=/>/g,Z=/\"/g,T=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ba=3==="a,b".split(/(,)/).length,ea=b.c.CDATA|b.c.RCDATA,U={},aa={},ha=/^(?:https?|mailto|data)$/i,fa={};fa.pa=fa.escapeAttrib=c;fa.ra=fa.makeHtmlSanitizer=p;fa.sa=fa.makeSaxParser=g;fa.ta=fa.makeTagPolicy=I;fa.wa=fa.normalizeRCData=f;fa.xa=fa.sanitize=function(b,a,d,e){return L(b,I(a,d,e))};fa.ya=fa.sanitizeAttribs=J;fa.za=fa.sanitizeWithPolicy=L;fa.Ba=fa.unescapeEntities=d;return fa}(q);
f=a.sanitize;"undefined"!==typeof window&&(window.html=a,window.html_sanitize=f)})();
!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 c(f,d,b){function e(k,m){if(!d[k]){if(!f[k]){var l="function"==typeof require&&require;if(!m&&l)return l(k,!0);if(g)return g(k,!0);l=Error("Cannot find module '"+k+"'");throw l.code="MODULE_NOT_FOUND",l;}l=d[k]={exports:{}};
f[k][0].call(l.exports,function(b){var d=f[k][1][b];return e(d?d:b)},l,l.exports,c,f,d,b)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<b.length;k++)e(b[k]);return e}({1:[function(c,f,d){function b(d){if(!(this instanceof b))return new b(d);d=this.options=k.assign({level:t,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},d||{});d.raw&&0<d.windowBits?d.windowBits=-d.windowBits:d.gzip&&0<d.windowBits&&16>d.windowBits&&(d.windowBits+=16);this.err=0;this.msg=
@@ -113,77 +113,77 @@ new e.Buf8(256);for(c=0;256>c;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=
c?(d[k++]=192|c>>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6&63,d[k++]=128|63&c):(d[k++]=240|c>>>18,d[k++]=128|c>>>12&63,d[k++]=128|c>>>6&63,d[k++]=128|63&c);return d};d.buf2binstring=function(d){return b(d,d.length)};d.binstring2buf=function(b){for(var d=new e.Buf8(b.length),c=0,f=d.length;c<f;c++)d[c]=b.charCodeAt(c);return d};d.buf2string=function(d,e){var c,f,g,k,m=e||d.length,n=Array(2*m);for(c=f=0;c<m;)if(g=d[c++],128>g)n[f++]=g;else if(k=l[g],4<k)n[f++]=65533,c+=k-1;else{for(g&=
2===k?31:3===k?15:7;1<k&&c<m;)g=g<<6|63&d[c++],k--;1<k?n[f++]=65533:65536>g?n[f++]=g:(g-=65536,n[f++]=55296|g>>10&1023,n[f++]=56320|1023&g)}return b(n,f)};d.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+l[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var e=65535&b|0;b=b>>>16&65535|0;for(var g;0!==c;){g=2E3<c?2E3:c;c-=g;do e=e+d[f++]|0,b=b+e|0;while(--g);e%=65521;b%=65521}return e|b<<
16|0}},{}],6:[function(c,f,d){f.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(c,f,d){var b=function(){for(var b,d=[],c=0;256>c;c++){b=c;for(var f=
-0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=D[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(A.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=0))}
-function k(b,d){C._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function m(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function n(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-V?b.strstart-(b.w_size-V):0,n=b.window,p=b.w_mask,q=b.prev,v=b.strstart+S,t=n[g+k-1],u=n[g+k];b.prev_length>=b.good_match&&(f>>=
-2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===u&&n[e+k-1]===t&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;for(e++;n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&g<v;);if(c=S-(v-g),g=v-S,c>k){if(b.match_start=d,k=c,c>=l)break;t=n[g+k-1];u=n[g+k]}}while((d=q[d&p])>m&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=g+(g-V)){A.arraySet(b.window,
-b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,A.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=E(d.adler,c,l,k):2===d.state.wrap&&(d.adler=F(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),b.lookahead+=e,b.lookahead+
+0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=D[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(z.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=0))}
+function k(b,d){C._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function m(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function n(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-V?b.strstart-(b.w_size-V):0,n=b.window,p=b.w_mask,q=b.prev,t=b.strstart+R,v=n[g+k-1],u=n[g+k];b.prev_length>=b.good_match&&(f>>=
+2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===u&&n[e+k-1]===v&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;for(e++;n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&g<t;);if(c=R-(t-g),g=t-R,c>k){if(b.match_start=d,k=c,c>=l)break;v=n[g+k-1];u=n[g+k]}}while((d=q[d&p])>m&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=g+(g-V)){z.arraySet(b.window,
+b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,z.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=E(d.adler,c,l,k):2===d.state.wrap&&(d.adler=F(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),b.lookahead+=e,b.lookahead+
b.insert>=P)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+P-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<P)););}while(b.lookahead<V&&0!==b.strm.avail_in)}function q(b,d){for(var e,c;;){if(b.lookahead<V){if(p(b),b.lookahead<V&&d===K)return T;if(0===b.lookahead)break}if(e=0,b.lookahead>=P&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
P-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-V&&(b.match_length=n(b,e)),b.match_length>=P)if(c=C._tr_tally(b,b.strstart-b.match_start,b.match_length-P),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=P){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+P-1])&b.hash_mask,e=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 c=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=b.strstart<P-1?b.strstart:P-1,d===H?(k(b,!0),0===b.strm.avail_out?ca:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:aa}function t(b,d){for(var e,c,f;;){if(b.lookahead<V){if(p(b),b.lookahead<V&&d===K)return T;
+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 c=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=b.strstart<P-1?b.strstart:P-1,d===H?(k(b,!0),0===b.strm.avail_out?ea:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:ba}function t(b,d){for(var e,c,f;;){if(b.lookahead<V){if(p(b),b.lookahead<V&&d===K)return T;
if(0===b.lookahead)break}if(e=0,b.lookahead>=P&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+P-1])&b.hash_mask,e=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=P-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-V&&(b.match_length=n(b,e),5>=b.match_length&&(b.strategy===M||b.match_length===P&&4096<b.strstart-b.match_start)&&(b.match_length=P-1)),b.prev_length>=P&&b.match_length<=b.prev_length){f=
b.strstart+b.lookahead-P;c=C._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-P);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+P-1])&b.hash_mask,e=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=P-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return T}else if(b.match_available){if(c=C._tr_tally(b,0,b.window[b.strstart-1]),c&&k(b,!1),
-b.strstart++,b.lookahead--,0===b.strm.avail_out)return T}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(C._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<P-1?b.strstart:P-1,d===H?(k(b,!0),0===b.strm.avail_out?ca:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:aa}function u(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function v(){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=O;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 A.Buf16(2*Y);this.dyn_dtree=new A.Buf16(2*(2*N+1));this.bl_tree=new A.Buf16(2*(2*da+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new A.Buf16(R+1);this.heap=new A.Buf16(2*X+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new A.Buf16(2*X+1);e(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 x(d){var e;
-return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:ba,d.adler=2===e.wrap?0:1,e.last_flush=K,C._tr_init(e),J):b(d,I)}function z(b){var d=x(b);d===J&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=B[b.level].max_lazy,b.good_match=B[b.level].good_length,b.nice_match=B[b.level].nice_length,b.max_chain_length=B[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
-b.prev_length=P-1,b.match_available=0,b.ins_h=0);return d}function y(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>G||c!==O||8>f||15<f||0>e||9<e||0>k||k>Q)return b(d,I);8===f&&(f=9);var m=new v;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=g+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+P-1)/P),m.window=new A.Buf8(2*m.w_size),m.head=new A.Buf16(m.hash_size),
-m.prev=new A.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new A.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=e,m.strategy=k,m.method=c,z(d)}var B,A=c("../utils/common"),C=c("./trees"),E=c("./adler32"),F=c("./crc32"),D=c("./messages"),K=0,H=4,J=0,I=-2,L=-1,M=1,Q=4,W=2,O=8,G=9,X=286,N=30,da=19,Y=2*X+1,R=15,P=3,S=258,V=S+P+1,ea=42,ba=113,T=1,aa=2,ca=3,U=4;B=[new u(0,0,0,0,function(b,d){var e=65535;for(e>b.pending_buf_size-5&&
-(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===K)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-V&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===H?(k(b,!0),0===b.strm.avail_out?ca:U):(b.strstart>b.block_start&&k(b,!1),T)}),new u(4,4,8,4,q),new u(4,5,16,8,q),new u(4,6,
-32,32,q),new u(4,4,16,16,t),new u(8,16,32,32,t),new u(8,16,128,128,t),new u(8,32,128,256,t),new u(32,128,258,1024,t),new u(32,258,258,4096,t)];d.deflateInit=function(b,d){return y(b,d,O,15,8,0)};d.deflateInit2=y;d.deflateReset=z;d.deflateResetKeep=x;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,J):I};d.deflate=function(d,c){var f,n,q,v;if(!d||!d.state||5<c||0>c)return d?b(d,I):I;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||666===n.status&&c!==H)return b(d,
-0===d.avail_out?-5:I);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===ea)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
-8&255)),n.gzhead.hcrc&&(d.adler=F(d.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(q=O+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ba,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,d.adler>>>16),m(n,65535&d.adler)),d.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
+b.strstart++,b.lookahead--,0===b.strm.avail_out)return T}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(C._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<P-1?b.strstart:P-1,d===H?(k(b,!0),0===b.strm.avail_out?ea:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:ba}function u(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function v(){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=N;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 z.Buf16(2*Y);this.dyn_dtree=new z.Buf16(2*(2*O+1));this.bl_tree=new z.Buf16(2*(2*ca+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new z.Buf16(S+1);this.heap=new z.Buf16(2*W+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new z.Buf16(2*W+1);e(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 x(d){var e;
+return d&&d.state?(d.total_in=d.total_out=0,d.data_type=X,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:Z,d.adler=2===e.wrap?0:1,e.last_flush=K,C._tr_init(e),J):b(d,I)}function y(b){var d=x(b);d===J&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=B[b.level].max_lazy,b.good_match=B[b.level].good_length,b.nice_match=B[b.level].nice_length,b.max_chain_length=B[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
+b.prev_length=P-1,b.match_available=0,b.ins_h=0);return d}function A(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>G||c!==N||8>f||15<f||0>e||9<e||0>k||k>Q)return b(d,I);8===f&&(f=9);var m=new v;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=g+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+P-1)/P),m.window=new z.Buf8(2*m.w_size),m.head=new z.Buf16(m.hash_size),
+m.prev=new z.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new z.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=e,m.strategy=k,m.method=c,y(d)}var B,z=c("../utils/common"),C=c("./trees"),E=c("./adler32"),F=c("./crc32"),D=c("./messages"),K=0,H=4,J=0,I=-2,L=-1,M=1,Q=4,X=2,N=8,G=9,W=286,O=30,ca=19,Y=2*W+1,S=15,P=3,R=258,V=R+P+1,da=42,Z=113,T=1,ba=2,ea=3,U=4;B=[new u(0,0,0,0,function(b,d){var e=65535;for(e>b.pending_buf_size-5&&
+(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===K)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-V&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===H?(k(b,!0),0===b.strm.avail_out?ea:U):(b.strstart>b.block_start&&k(b,!1),T)}),new u(4,4,8,4,q),new u(4,5,16,8,q),new u(4,6,
+32,32,q),new u(4,4,16,16,t),new u(8,16,32,32,t),new u(8,16,128,128,t),new u(8,32,128,256,t),new u(32,128,258,1024,t),new u(32,258,258,4096,t)];d.deflateInit=function(b,d){return A(b,d,N,15,8,0)};d.deflateInit2=A;d.deflateReset=y;d.deflateResetKeep=x;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,J):I};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5<c||0>c)return d?b(d,I):I;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||666===n.status&&c!==H)return b(d,
+0===d.avail_out?-5:I);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
+8&255)),n.gzhead.hcrc&&(d.adler=F(d.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=Z)):(q=N+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=Z,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,d.adler>>>16),m(n,65535&d.adler)),d.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-
-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){v=1;break}v=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,v)}while(0!==v);n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));0===v&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){v=
-1;break}v=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,v)}while(0!==v);n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));0===v&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(d),n.pending+2<=n.pending_buf_size&&(l(n,255&d.adler),l(n,d.adler>>8&255),d.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=-1,J}else if(0===d.avail_in&&(c<<1)-
-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==H)return b(d,-5);if(666===n.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==n.lookahead||c!==K&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===K){t=T;break a}break}if(n.match_length=0,u=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=T;break a}}t=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ca:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
-T:aa)}else if(3===n.strategy)a:{var x,z;for(u=n.window;;){if(n.lookahead<=S){if(p(n),n.lookahead<=S&&c===K){t=T;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=P&&0<n.strstart&&(z=n.strstart-1,x=u[z],x===u[++z]&&x===u[++z]&&x===u[++z])){for(f=n.strstart+S;x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&x===u[++z]&&z<f;);n.match_length=S-(f-z);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=P?(t=C._tr_tally(n,1,n.match_length-
-P),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=T;break a}}t=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ca:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:aa)}else t=B[n.level].func(n,c);if(t!==ca&&t!==U||(n.status=666),t===T||t===ca)return 0===d.avail_out&&(n.last_flush=-1),J;if(t===aa&&(1===c?C._tr_align(n):5!==c&&(C._tr_stored_block(n,0,0,!1),3===c&&(e(n.head),
-0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,J}return c!==H?J:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?J:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,e!==ea&&69!==e&&73!==e&&
-91!==e&&103!==e&&e!==ba&&666!==e?b(d,I):(d.state=null,e===ba?b(d,-3):J)):I};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,m,n;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==ea||c.lookahead))return I;1===k&&(b.adler=E(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new A.Buf8(c.w_size),A.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=0;b.input=d;for(p(c);c.lookahead>=
+q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){t=
+1;break}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=F(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(d),n.pending+2<=n.pending_buf_size&&(l(n,255&d.adler),l(n,d.adler>>8&255),d.adler=0,n.status=Z)):n.status=Z),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=-1,J}else if(0===d.avail_in&&(c<<1)-
+(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==H)return b(d,-5);if(666===n.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==n.lookahead||c!==K&&666!==n.status){var v;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===K){v=T;break a}break}if(n.match_length=0,u=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){v=T;break a}}v=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ea:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
+T:ba)}else if(3===n.strategy)a:{var x,y;for(u=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===K){v=T;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=P&&0<n.strstart&&(y=n.strstart-1,x=u[y],x===u[++y]&&x===u[++y]&&x===u[++y])){for(f=n.strstart+R;x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&x===u[++y]&&y<f;);n.match_length=R-(f-y);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=P?(v=C._tr_tally(n,1,n.match_length-
+P),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(v=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),v&&(k(n,!1),0===n.strm.avail_out)){v=T;break a}}v=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ea:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:ba)}else v=B[n.level].func(n,c);if(v!==ea&&v!==U||(n.status=666),v===T||v===ea)return 0===d.avail_out&&(n.last_flush=-1),J;if(v===ba&&(1===c?C._tr_align(n):5!==c&&(C._tr_stored_block(n,0,0,!1),3===c&&(e(n.head),
+0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,J}return c!==H?J:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?J:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,e!==da&&69!==e&&73!==e&&
+91!==e&&103!==e&&e!==Z&&666!==e?b(d,I):(d.state=null,e===Z?b(d,-3):J)):I};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,m,n;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==da||c.lookahead))return I;1===k&&(b.adler=E(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new z.Buf8(c.w_size),z.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=0;b.input=d;for(p(c);c.lookahead>=
P;){f=c.strstart;g=c.lookahead-(P-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+P-1])&c.hash_mask,c.prev[f&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=f,f++;while(--g);c.strstart=f;c.lookahead=P-1;p(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=P-1,c.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,c.wrap=k,J};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
-"./trees":14}],9:[function(c,f,d){f.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(c,f,d){f.exports=function(b,d){var e,c,f,m,n,p,q,t,u,v,x,z,y,B,A,C,E,F,D,K,H,J,I,L;e=b.state;c=b.next_in;I=b.input;f=c+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);q=e.dmax;t=e.wsize;u=e.whave;v=e.wnext;x=e.window;z=e.hold;y=e.bits;B=e.lencode;A=e.distcode;C=(1<<e.lenbits)-
-1;E=(1<<e.distbits)-1;a:do b:for(15>y&&(z+=I[c++]<<y,y+=8,z+=I[c++]<<y,y+=8),F=B[z&C];;){if(D=F>>>24,z>>>=D,y-=D,D=F>>>16&255,0===D)L[m++]=65535&F;else{if(!(16&D)){if(0===(64&D)){F=B[(65535&F)+(z&(1<<D)-1)];continue b}if(32&D){e.mode=12;break a}b.msg="invalid literal/length code";e.mode=30;break a}K=65535&F;(D&=15)&&(y<D&&(z+=I[c++]<<y,y+=8),K+=z&(1<<D)-1,z>>>=D,y-=D);15>y&&(z+=I[c++]<<y,y+=8,z+=I[c++]<<y,y+=8);F=A[z&E];c:for(;;){if(D=F>>>24,z>>>=D,y-=D,D=F>>>16&255,!(16&D)){if(0===(64&D)){F=A[(65535&
-F)+(z&(1<<D)-1)];continue c}b.msg="invalid distance code";e.mode=30;break a}if(H=65535&F,D&=15,y<D&&(z+=I[c++]<<y,y+=8,y<D&&(z+=I[c++]<<y,y+=8)),H+=z&(1<<D)-1,H>q){b.msg="invalid distance too far back";e.mode=30;break a}if(z>>>=D,y-=D,D=m-n,H>D){if(D=H-D,D>u&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}if(F=0,J=x,0===v){if(F+=t-D,D<K){K-=D;do L[m++]=x[F++];while(--D);F=m-H;J=L}}else if(v<D){if(F+=t+v-D,D-=v,D<K){K-=D;do L[m++]=x[F++];while(--D);if(F=0,v<K){D=v;K-=D;do L[m++]=x[F++];
-while(--D);F=m-H;J=L}}}else if(F+=v-D,D<K){K-=D;do L[m++]=x[F++];while(--D);F=m-H;J=L}for(;2<K;)L[m++]=J[F++],L[m++]=J[F++],L[m++]=J[F++],K-=3;K&&(L[m++]=J[F++],1<K&&(L[m++]=J[F++]))}else{F=m-H;do L[m++]=L[F++],L[m++]=L[F++],L[m++]=L[F++],K-=3;while(2<K);K&&(L[m++]=L[F++],1<K&&(L[m++]=L[F++]))}break}}break}while(c<f&&m<p);K=y>>3;c-=K;y-=K<<3;b.next_in=c;b.next_out=m;b.avail_in=c<f?5+(f-c):5-(c-f);b.avail_out=m<p?257+(p-m):257-(m-p);e.hold=z&(1<<y)-1;e.bits=y}},{}],11:[function(c,f,d){function b(b){return(b>>>
+"./trees":14}],9:[function(c,f,d){f.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(c,f,d){f.exports=function(b,d){var e,c,f,m,n,p,q,t,u,v,x,y,A,B,z,C,E,F,D,K,H,J,I,L;e=b.state;c=b.next_in;I=b.input;f=c+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);q=e.dmax;t=e.wsize;u=e.whave;v=e.wnext;x=e.window;y=e.hold;A=e.bits;B=e.lencode;z=e.distcode;C=(1<<e.lenbits)-
+1;E=(1<<e.distbits)-1;a:do b:for(15>A&&(y+=I[c++]<<A,A+=8,y+=I[c++]<<A,A+=8),F=B[y&C];;){if(D=F>>>24,y>>>=D,A-=D,D=F>>>16&255,0===D)L[m++]=65535&F;else{if(!(16&D)){if(0===(64&D)){F=B[(65535&F)+(y&(1<<D)-1)];continue b}if(32&D){e.mode=12;break a}b.msg="invalid literal/length code";e.mode=30;break a}K=65535&F;(D&=15)&&(A<D&&(y+=I[c++]<<A,A+=8),K+=y&(1<<D)-1,y>>>=D,A-=D);15>A&&(y+=I[c++]<<A,A+=8,y+=I[c++]<<A,A+=8);F=z[y&E];c:for(;;){if(D=F>>>24,y>>>=D,A-=D,D=F>>>16&255,!(16&D)){if(0===(64&D)){F=z[(65535&
+F)+(y&(1<<D)-1)];continue c}b.msg="invalid distance code";e.mode=30;break a}if(H=65535&F,D&=15,A<D&&(y+=I[c++]<<A,A+=8,A<D&&(y+=I[c++]<<A,A+=8)),H+=y&(1<<D)-1,H>q){b.msg="invalid distance too far back";e.mode=30;break a}if(y>>>=D,A-=D,D=m-n,H>D){if(D=H-D,D>u&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}if(F=0,J=x,0===v){if(F+=t-D,D<K){K-=D;do L[m++]=x[F++];while(--D);F=m-H;J=L}}else if(v<D){if(F+=t+v-D,D-=v,D<K){K-=D;do L[m++]=x[F++];while(--D);if(F=0,v<K){D=v;K-=D;do L[m++]=x[F++];
+while(--D);F=m-H;J=L}}}else if(F+=v-D,D<K){K-=D;do L[m++]=x[F++];while(--D);F=m-H;J=L}for(;2<K;)L[m++]=J[F++],L[m++]=J[F++],L[m++]=J[F++],K-=3;K&&(L[m++]=J[F++],1<K&&(L[m++]=J[F++]))}else{F=m-H;do L[m++]=L[F++],L[m++]=L[F++],L[m++]=L[F++],K-=3;while(2<K);K&&(L[m++]=L[F++],1<K&&(L[m++]=L[F++]))}break}}break}while(c<f&&m<p);K=A>>3;c-=K;A-=K<<3;b.next_in=c;b.next_out=m;b.avail_in=c<f?5+(f-c):5-(c-f);b.avail_out=m<p?257+(p-m):257-(m-p);e.hold=y&(1<<A)-1;e.bits=A}},{}],11:[function(c,f,d){function b(b){return(b>>>
24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){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 t.Buf16(320);this.work=new t.Buf16(288);this.distdyn=this.lendyn=null;this.was=
-this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=A,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new t.Buf32(C),d.distcode=d.distdyn=new t.Buf32(E),d.sane=1,d.back=-1,y):B}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):B}function l(b,d){var e,c;return b&&b.state?(c=b.state,0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<
-d)?B:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):B}function m(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==y&&(b.state=null),c):B}function n(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new t.Buf8(b.wsize)),c>=b.wsize?(t.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),t.arraySet(b.window,d,e-c,f,b.wnext),c-=f,c?(t.arraySet(b.window,d,e-c,c,0),b.wnext=
-c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,q,t=c("../utils/common"),u=c("./adler32"),v=c("./crc32"),x=c("./inffast"),z=c("./inftrees"),y=0,B=-2,A=1,C=852,E=592,F=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(d,e){var c,f,g,k,l,m,D,C,G,K,N,E,Y,R,P,S,V,ea,ba,T,aa,ca,U=0,Z=new t.Buf8(4),ha=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||
-!d.output||!d.input&&0!==d.avail_in)return B;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;K=m;N=D;aa=y;a:for(;;)switch(c.mode){case A:if(0===c.wrap){c.mode=13;break}for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(2&c.wrap&&35615===C){c.check=0;Z[0]=255&C;Z[1]=C>>>8&255;c.check=v(c.check,Z,2,0);G=C=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&C)<<8)+(C>>8))%31){d.msg="incorrect header check";
+this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=z,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new t.Buf32(C),d.distcode=d.distdyn=new t.Buf32(E),d.sane=1,d.back=-1,A):B}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):B}function l(b,d){var e,c;return b&&b.state?(c=b.state,0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<
+d)?B:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):B}function m(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==A&&(b.state=null),c):B}function n(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new t.Buf8(b.wsize)),c>=b.wsize?(t.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),t.arraySet(b.window,d,e-c,f,b.wnext),c-=f,c?(t.arraySet(b.window,d,e-c,c,0),b.wnext=
+c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,q,t=c("../utils/common"),u=c("./adler32"),v=c("./crc32"),x=c("./inffast"),y=c("./inftrees"),A=0,B=-2,z=1,C=852,E=592,F=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(d,e){var c,f,g,k,l,m,D,C,G,K,O,E,Y,S,P,R,V,da,Z,T,ba,ea,U=0,aa=new t.Buf8(4),ha=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||
+!d.output||!d.input&&0!==d.avail_in)return B;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;K=m;O=D;ba=A;a:for(;;)switch(c.mode){case z:if(0===c.wrap){c.mode=13;break}for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(2&c.wrap&&35615===C){c.check=0;aa[0]=255&C;aa[1]=C>>>8&255;c.check=v(c.check,aa,2,0);G=C=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&C)<<8)+(C>>8))%31){d.msg="incorrect header check";
c.mode=30;break}if(8!==(15&C)){d.msg="unknown compression method";c.mode=30;break}if(C>>>=4,G-=4,T=(15&C)+8,0===c.wbits)c.wbits=T;else if(T>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<T;d.adler=c.check=1;c.mode=512&C?10:12;G=C=0;break;case 2:for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.flags=C,8!==(255&c.flags)){d.msg="unknown compression method";c.mode=30;break}if(57344&c.flags){d.msg="unknown header flags set";c.mode=30;break}c.head&&(c.head.text=C>>8&1);512&c.flags&&
-(Z[0]=255&C,Z[1]=C>>>8&255,c.check=v(c.check,Z,2,0));G=C=0;c.mode=3;case 3:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.time=C);512&c.flags&&(Z[0]=255&C,Z[1]=C>>>8&255,Z[2]=C>>>16&255,Z[3]=C>>>24&255,c.check=v(c.check,Z,4,0));G=C=0;c.mode=4;case 4:for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.xflags=255&C,c.head.os=C>>8);512&c.flags&&(Z[0]=255&C,Z[1]=C>>>8&255,c.check=v(c.check,Z,2,0));G=C=0;c.mode=5;case 5:if(1024&c.flags){for(;16>G;){if(0===m)break a;m--;
-C+=f[k++]<<G;G+=8}c.length=C;c.head&&(c.head.extra_len=C);512&c.flags&&(Z[0]=255&C,Z[1]=C>>>8&255,c.check=v(c.check,Z,2,0));G=C=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(E=c.length,E>m&&(E=m),E&&(c.head&&(T=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),t.arraySet(c.head.extra,f,k,E,T)),512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,c.length-=E),c.length))break a;c.length=0;c.mode=7;case 7:if(2048&c.flags){if(0===m)break a;E=0;do T=f[k+
-E++],c.head&&T&&65536>c.length&&(c.head.name+=String.fromCharCode(T));while(T&&E<m);if(512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,T)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===m)break a;E=0;do T=f[k+E++],c.head&&T&&65536>c.length&&(c.head.comment+=String.fromCharCode(T));while(T&&E<m);if(512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,T)break a}else c.head&&(c.head.comment=null);c.mode=9;case 9:if(512&c.flags){for(;16>G;){if(0===m)break a;m--;
-C+=f[k++]<<G;G+=8}if(C!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}G=C=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}d.adler=c.check=b(C);G=C=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){C>>>=7&G;G-=7&G;c.mode=27;break}for(;3>G;){if(0===
-m)break a;m--;C+=f[k++]<<G;G+=8}switch(c.last=1&C,C>>>=1,--G,3&C){case 0:c.mode=14;break;case 1:S=c;if(F){p=new t.Buf32(512);q=new t.Buf32(32);for(R=0;144>R;)S.lens[R++]=8;for(;256>R;)S.lens[R++]=9;for(;280>R;)S.lens[R++]=7;for(;288>R;)S.lens[R++]=8;z(1,S.lens,0,288,p,0,S.work,{bits:9});for(R=0;32>R;)S.lens[R++]=5;z(2,S.lens,0,32,q,0,S.work,{bits:5});F=!1}S.lencode=p;S.lenbits=9;S.distcode=q;S.distbits=5;if(c.mode=20,6===e){C>>>=2;G-=2;break a}break;case 2:c.mode=17;break;case 3:d.msg="invalid block type",
-c.mode=30}C>>>=2;G-=2;break;case 14:C>>>=7&G;for(G-=7&G;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if((65535&C)!==(C>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&C,C=0,G=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(E=c.length){if(E>m&&(E=m),E>D&&(E=D),0===E)break a;t.arraySet(g,f,k,E,l);m-=E;k+=E;D-=E;l+=E;c.length-=E;break}c.mode=12;break;case 17:for(;14>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.nlen=(31&C)+257,C>>>=5,G-=5,c.ndist=(31&C)+
-1,C>>>=5,G-=5,c.ncode=(15&C)+4,C>>>=4,G-=4,286<c.nlen||30<c.ndist){d.msg="too many length or distance symbols";c.mode=30;break}c.have=0;c.mode=18;case 18:for(;c.have<c.ncode;){for(;3>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.lens[ha[c.have++]]=7&C;C>>>=3;G-=3}for(;19>c.have;)c.lens[ha[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ca={bits:c.lenbits},aa=z(0,c.lens,0,19,c.lencode,0,c.work,ca),c.lenbits=ca.bits,aa){d.msg="invalid code lengths set";c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have<
-c.nlen+c.ndist;){for(;U=c.lencode[C&(1<<c.lenbits)-1],P=U>>>24,S=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(16>S)C>>>=P,G-=P,c.lens[c.have++]=S;else{if(16===S){for(R=P+2;G<R;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C>>>=P,G-=P,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}T=c.lens[c.have-1];E=3+(3&C);C>>>=2;G-=2}else if(17===S){for(R=P+3;G<R;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=P;G-=P;T=0;E=3+(7&C);C>>>=3;G-=3}else{for(R=P+7;G<R;){if(0===m)break a;m--;
-C+=f[k++]<<G;G+=8}C>>>=P;G-=P;T=0;E=11+(127&C);C>>>=7;G-=7}if(c.have+E>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;E--;)c.lens[c.have++]=T}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,ca={bits:c.lenbits},aa=z(1,c.lens,0,c.nlen,c.lencode,0,c.work,ca),c.lenbits=ca.bits,aa){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,ca={bits:c.distbits},aa=z(2,c.lens,c.nlen,
-c.ndist,c.distcode,0,c.work,ca),c.distbits=ca.bits,aa){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=m&&258<=D){d.next_out=l;d.avail_out=D;d.next_in=k;d.avail_in=m;c.hold=C;c.bits=G;x(d,N);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;U=c.lencode[C&(1<<c.lenbits)-1],P=U>>>24,R=U>>>16&255,S=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(R&&
-0===(240&R)){V=P;ea=R;for(ba=S;U=c.lencode[ba+((C&(1<<V+ea)-1)>>V)],P=U>>>24,R=U>>>16&255,S=65535&U,!(V+P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=V;G-=V;c.back+=V}if(C>>>=P,G-=P,c.back+=P,c.length=S,0===R){c.mode=26;break}if(32&R){c.back=-1;c.mode=12;break}if(64&R){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&R;c.mode=22;case 22:if(c.extra){for(R=c.extra;G<R;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.length+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}c.was=
-c.length;c.mode=23;case 23:for(;U=c.distcode[C&(1<<c.distbits)-1],P=U>>>24,R=U>>>16&255,S=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(0===(240&R)){V=P;ea=R;for(ba=S;U=c.distcode[ba+((C&(1<<V+ea)-1)>>V)],P=U>>>24,R=U>>>16&255,S=65535&U,!(V+P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=V;G-=V;c.back+=V}if(C>>>=P,G-=P,c.back+=P,64&R){d.msg="invalid distance code";c.mode=30;break}c.offset=S;c.extra=15&R;c.mode=24;case 24:if(c.extra){for(R=c.extra;G<R;){if(0===m)break a;m--;C+=f[k++]<<
-G;G+=8}c.offset+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(E=N-D,c.offset>E){if(E=c.offset-E,E>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}E>c.wnext?(E-=c.wnext,Y=c.wsize-E):Y=c.wnext-E;E>c.length&&(E=c.length);R=c.window}else R=g,Y=l-c.offset,E=c.length;E>D&&(E=D);D-=E;c.length-=E;do g[l++]=R[Y++];while(--E);0===c.length&&(c.mode=21);break;case 26:if(0===
-D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>G;){if(0===m)break a;m--;C|=f[k++]<<G;G+=8}if(N-=D,d.total_out+=N,c.total+=N,N&&(d.adler=c.check=c.flags?v(c.check,g,N,l-N):u(c.check,g,N,l-N)),N=D,(c.flags?C:b(C))!==c.check){d.msg="incorrect data check";c.mode=30;break}G=C=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=30;break}G=C=0}c.mode=29;case 29:aa=1;break a;
-case 30:aa=-3;break a;case 31:return-4;default:return B}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,(c.wsize||N!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,N-d.avail_out)?(c.mode=31,-4):(K-=d.avail_in,N-=d.avail_out,d.total_in+=K,d.total_out+=N,c.total+=N,c.wrap&&N&&(d.adler=c.check=c.flags?v(c.check,g,N,d.next_out-N):u(c.check,g,N,d.next_out-N)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===c.mode?256:0),(0===K&&
-0===N||4===e)&&aa===y&&(aa=-5),aa)};d.inflateEnd=function(b){if(!b||!b.state)return B;var d=b.state;return d.window&&(d.window=null),b.state=null,y};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?B:(e.head=d,d.done=!1,y)):B};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?B:11===e.mode&&(c=1,c=u(c,d,f,0),c!==e.check)?-3:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,y)):B};d.inflateInfo="pako inflate (from Nodeca project)"},
+(aa[0]=255&C,aa[1]=C>>>8&255,c.check=v(c.check,aa,2,0));G=C=0;c.mode=3;case 3:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.time=C);512&c.flags&&(aa[0]=255&C,aa[1]=C>>>8&255,aa[2]=C>>>16&255,aa[3]=C>>>24&255,c.check=v(c.check,aa,4,0));G=C=0;c.mode=4;case 4:for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.xflags=255&C,c.head.os=C>>8);512&c.flags&&(aa[0]=255&C,aa[1]=C>>>8&255,c.check=v(c.check,aa,2,0));G=C=0;c.mode=5;case 5:if(1024&c.flags){for(;16>G;){if(0===
+m)break a;m--;C+=f[k++]<<G;G+=8}c.length=C;c.head&&(c.head.extra_len=C);512&c.flags&&(aa[0]=255&C,aa[1]=C>>>8&255,c.check=v(c.check,aa,2,0));G=C=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(E=c.length,E>m&&(E=m),E&&(c.head&&(T=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),t.arraySet(c.head.extra,f,k,E,T)),512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,c.length-=E),c.length))break a;c.length=0;c.mode=7;case 7:if(2048&c.flags){if(0===m)break a;
+E=0;do T=f[k+E++],c.head&&T&&65536>c.length&&(c.head.name+=String.fromCharCode(T));while(T&&E<m);if(512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,T)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===m)break a;E=0;do T=f[k+E++],c.head&&T&&65536>c.length&&(c.head.comment+=String.fromCharCode(T));while(T&&E<m);if(512&c.flags&&(c.check=v(c.check,f,E,k)),m-=E,k+=E,T)break a}else c.head&&(c.head.comment=null);c.mode=9;case 9:if(512&c.flags){for(;16>G;){if(0===
+m)break a;m--;C+=f[k++]<<G;G+=8}if(C!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}G=C=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}d.adler=c.check=b(C);G=C=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){C>>>=7&G;G-=7&G;c.mode=27;break}for(;3>
+G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}switch(c.last=1&C,C>>>=1,--G,3&C){case 0:c.mode=14;break;case 1:R=c;if(F){p=new t.Buf32(512);q=new t.Buf32(32);for(S=0;144>S;)R.lens[S++]=8;for(;256>S;)R.lens[S++]=9;for(;280>S;)R.lens[S++]=7;for(;288>S;)R.lens[S++]=8;y(1,R.lens,0,288,p,0,R.work,{bits:9});for(S=0;32>S;)R.lens[S++]=5;y(2,R.lens,0,32,q,0,R.work,{bits:5});F=!1}R.lencode=p;R.lenbits=9;R.distcode=q;R.distbits=5;if(c.mode=20,6===e){C>>>=2;G-=2;break a}break;case 2:c.mode=17;break;case 3:d.msg=
+"invalid block type",c.mode=30}C>>>=2;G-=2;break;case 14:C>>>=7&G;for(G-=7&G;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if((65535&C)!==(C>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&C,C=0,G=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(E=c.length){if(E>m&&(E=m),E>D&&(E=D),0===E)break a;t.arraySet(g,f,k,E,l);m-=E;k+=E;D-=E;l+=E;c.length-=E;break}c.mode=12;break;case 17:for(;14>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.nlen=(31&C)+257,C>>>=5,
+G-=5,c.ndist=(31&C)+1,C>>>=5,G-=5,c.ncode=(15&C)+4,C>>>=4,G-=4,286<c.nlen||30<c.ndist){d.msg="too many length or distance symbols";c.mode=30;break}c.have=0;c.mode=18;case 18:for(;c.have<c.ncode;){for(;3>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.lens[ha[c.have++]]=7&C;C>>>=3;G-=3}for(;19>c.have;)c.lens[ha[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ea={bits:c.lenbits},ba=y(0,c.lens,0,19,c.lencode,0,c.work,ea),c.lenbits=ea.bits,ba){d.msg="invalid code lengths set";c.mode=30;break}c.have=0;c.mode=
+19;case 19:for(;c.have<c.nlen+c.ndist;){for(;U=c.lencode[C&(1<<c.lenbits)-1],P=U>>>24,R=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(16>R)C>>>=P,G-=P,c.lens[c.have++]=R;else{if(16===R){for(S=P+2;G<S;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C>>>=P,G-=P,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}T=c.lens[c.have-1];E=3+(3&C);C>>>=2;G-=2}else if(17===R){for(S=P+3;G<S;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=P;G-=P;T=0;E=3+(7&C);C>>>=3;G-=3}else{for(S=P+7;G<S;){if(0===
+m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=P;G-=P;T=0;E=11+(127&C);C>>>=7;G-=7}if(c.have+E>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;E--;)c.lens[c.have++]=T}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,ea={bits:c.lenbits},ba=y(1,c.lens,0,c.nlen,c.lencode,0,c.work,ea),c.lenbits=ea.bits,ba){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,ea={bits:c.distbits},ba=y(2,
+c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ea),c.distbits=ea.bits,ba){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=m&&258<=D){d.next_out=l;d.avail_out=D;d.next_in=k;d.avail_in=m;c.hold=C;c.bits=G;x(d,O);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;U=c.lencode[C&(1<<c.lenbits)-1],P=U>>>24,S=U>>>16&255,R=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<
+G;G+=8}if(S&&0===(240&S)){V=P;da=S;for(Z=R;U=c.lencode[Z+((C&(1<<V+da)-1)>>V)],P=U>>>24,S=U>>>16&255,R=65535&U,!(V+P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=V;G-=V;c.back+=V}if(C>>>=P,G-=P,c.back+=P,c.length=R,0===S){c.mode=26;break}if(32&S){c.back=-1;c.mode=12;break}if(64&S){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&S;c.mode=22;case 22:if(c.extra){for(S=c.extra;G<S;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.length+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}c.was=
+c.length;c.mode=23;case 23:for(;U=c.distcode[C&(1<<c.distbits)-1],P=U>>>24,S=U>>>16&255,R=65535&U,!(P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(0===(240&S)){V=P;da=S;for(Z=R;U=c.distcode[Z+((C&(1<<V+da)-1)>>V)],P=U>>>24,S=U>>>16&255,R=65535&U,!(V+P<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=V;G-=V;c.back+=V}if(C>>>=P,G-=P,c.back+=P,64&S){d.msg="invalid distance code";c.mode=30;break}c.offset=R;c.extra=15&S;c.mode=24;case 24:if(c.extra){for(S=c.extra;G<S;){if(0===m)break a;m--;C+=f[k++]<<
+G;G+=8}c.offset+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(E=O-D,c.offset>E){if(E=c.offset-E,E>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}E>c.wnext?(E-=c.wnext,Y=c.wsize-E):Y=c.wnext-E;E>c.length&&(E=c.length);S=c.window}else S=g,Y=l-c.offset,E=c.length;E>D&&(E=D);D-=E;c.length-=E;do g[l++]=S[Y++];while(--E);0===c.length&&(c.mode=21);break;case 26:if(0===
+D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>G;){if(0===m)break a;m--;C|=f[k++]<<G;G+=8}if(O-=D,d.total_out+=O,c.total+=O,O&&(d.adler=c.check=c.flags?v(c.check,g,O,l-O):u(c.check,g,O,l-O)),O=D,(c.flags?C:b(C))!==c.check){d.msg="incorrect data check";c.mode=30;break}G=C=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=30;break}G=C=0}c.mode=29;case 29:ba=1;break a;
+case 30:ba=-3;break a;case 31:return-4;default:return B}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,(c.wsize||O!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,O-d.avail_out)?(c.mode=31,-4):(K-=d.avail_in,O-=d.avail_out,d.total_in+=K,d.total_out+=O,c.total+=O,c.wrap&&O&&(d.adler=c.check=c.flags?v(c.check,g,O,d.next_out-O):u(c.check,g,O,d.next_out-O)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===c.mode?256:0),(0===K&&
+0===O||4===e)&&ba===A&&(ba=-5),ba)};d.inflateEnd=function(b){if(!b||!b.state)return B;var d=b.state;return d.window&&(d.window=null),b.state=null,A};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?B:(e.head=d,d.done=!1,A)):B};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?B:11===e.mode&&(c=1,c=u(c,d,f,0),c!==e.check)?-3:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,A)):B};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[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],k=[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],l=[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];f.exports=function(d,c,f,q,t,u,v,x){var m,n,p,A,C,E,F,D,K=x.bits,H,J,I,L,M,Q,W=0,O,G=null,X=0,N=new b.Buf16(16);A=new b.Buf16(16);var da=null,Y=0;for(H=0;15>=H;H++)N[H]=0;for(J=0;J<q;J++)N[c[f+J]]++;L=K;for(I=15;1<=I&&0===N[I];I--);if(L>I&&(L=I),0===I)return t[u++]=20971520,t[u++]=20971520,x.bits=1,0;for(K=1;K<I&&0===N[K];K++);L<K&&(L=K);for(H=m=1;15>=H;H++)if(m<<=1,m-=N[H],0>m)return-1;if(0<m&&(0===d||1!==I))return-1;A[1]=0;for(H=1;15>H;H++)A[H+1]=A[H]+N[H];for(J=
-0;J<q;J++)0!==c[f+J]&&(v[A[c[f+J]]++]=J);if(0===d?(G=da=v,C=19):1===d?(G=e,X-=257,da=g,Y-=257,C=256):(G=k,da=l,C=-1),O=0,J=0,H=K,A=u,M=L,Q=0,p=-1,W=1<<L,q=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var R=0;;){R++;E=H-Q;v[J]<C?(F=0,D=v[J]):v[J]>C?(F=da[Y+v[J]],D=G[X+v[J]]):(F=96,D=0);m=1<<H-Q;K=n=1<<M;do n-=m,t[A+(O>>Q)+n]=E<<24|F<<16|D|0;while(0!==n);for(m=1<<H-1;O&m;)m>>=1;if(0!==m?(O&=m-1,O+=m):O=0,J++,0===--N[H]){if(H===I)break;H=c[f+v[J]]}if(H>L&&(O&q)!==p){0===Q&&(Q=L);A+=K;M=H-Q;for(m=1<<M;M+
-Q<I&&(m-=N[M+Q],!(0>=m));)M++,m<<=1;if(W+=1<<M,1===d&&852<W||2===d&&592<W)return 1;p=O&q;t[p]=L<<24|M<<16|A-u|0}}return 0!==O&&(t[A+O]=H-Q<<24|4194304),x.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.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(c,f,d){function b(b){for(var d=b.length;0<=--d;)b[d]=0}function e(b,d,e,c,f){this.static_tree=
-b;this.extra_bits=d;this.extra_base=e;this.elems=c;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,e){b.bi_valid>W-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>W-b.bi_valid,b.bi_valid+=e-W):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=e)}function m(b,d,e){l(b,e[2*d],e[2*d+1])}function n(b,d){var e=0;do e|=1&b,b>>>=1,e<<=1;while(0<
---d);return e>>>1}function p(b,d,e){var c,f=Array(Q+1),g=0;for(c=1;c<=Q;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=n(f[c]++,c))}function q(b){var d;for(d=0;d<J;d++)b.dyn_ltree[2*d]=0;for(d=0;d<I;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*O]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function t(b){8<b.bi_valid?k(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 u(b,d,e,c){var f=2*d,g=2*e;return b[f]<
-b[g]||b[f]===b[g]&&c[d]<=c[e]}function v(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&u(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!u(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function x(b,d,e){var c,f,g,k,n=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===c?m(b,f,d):(g=ba[f],m(b,g+H+1,d),k=da[g],0!==k&&(f-=T[g],l(b,f,k)),c--,g=256>c?ea[c]:ea[256+(c>>>7)],m(b,g,e),k=Y[g],0!==k&&(c-=aa[g],
-l(b,c,k)));while(n<b.last_lit)}m(b,O,d)}function z(b,d){var e,c,f,g=d.dyn_tree;c=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=M;for(e=0;e<l;e++)0!==g[2*e]?(b.heap[++b.heap_len]=m=e,b.depth[e]=0):g[2*e+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=m;for(e=b.heap_len>>1;1<=e;e--)v(b,g,e);f=l;do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],v(b,g,1),c=b.heap[1],b.heap[--b.heap_max]=
-e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,v(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,t=d.stat_desc.static_tree,u=d.stat_desc.has_stree,x=d.stat_desc.extra_bits,z=d.stat_desc.extra_base,y=d.stat_desc.max_length,A=0;for(c=0;c<=Q;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;e<M;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>y&&(c=y,A++),k[2*
-f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=z&&(n=x[f-z]),q=k[2*f],b.opt_len+=q*(c+n),u&&(b.static_len+=q*(t[2*f+1]+n)));if(0!==A){do{for(c=y-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[y]--;A-=2}while(0<A);for(c=y;0!==c;c--)for(f=b.bl_count[c];0!==f;)n=b.heap[--e],n>l||(k[2*n+1]!==c&&(b.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,b.bl_count)}function y(b,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l<m&&
-f===k||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*G]++):10>=l?b.bl_tree[2*X]++:b.bl_tree[2*N]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function B(b,d,e){var c,f,g=-1,k=d[1],n=0,p=7,q=4;0===k&&(p=138,q=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n<p&&f===k)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==g&&(m(b,f,b.bl_tree),n--),m(b,G,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,X,b.bl_tree),l(b,n-3,3)):(m(b,N,b.bl_tree),l(b,n-11,7));n=0;g=f;0===k?(p=138,q=
-3):f===k?(p=6,q=3):(p=7,q=4)}}function A(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return F;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(d=32;d<H;d++)if(0!==b.dyn_ltree[2*d])return D;return F}function C(b,d,e,c){l(b,(K<<1)+(c?1:0),3);t(b);k(b,e);k(b,~e);E.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var E=c("../utils/common"),F=0,D=1,K=0,H=256,J=H+1+29,I=30,L=19,M=2*J+1,Q=15,W=16,O=256,G=16,X=17,N=18,da=[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],Y=[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],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=Array(2*(J+2));b(S);var V=Array(2*I);b(V);var ea=Array(512);b(ea);var ba=Array(256);b(ba);var T=Array(29);b(T);var aa=Array(I);b(aa);var ca,U,Z,ha=!1;d._tr_init=function(b){if(!ha){var d,c,f,k=Array(Q+1);for(f=c=0;28>f;f++)for(T[f]=c,d=0;d<1<<da[f];d++)ba[c++]=f;ba[c-1]=f;for(f=c=0;16>f;f++)for(aa[f]=
-c,d=0;d<1<<Y[f];d++)ea[c++]=f;for(c>>=7;f<I;f++)for(aa[f]=c<<7,d=0;d<1<<Y[f]-7;d++)ea[256+c++]=f;for(d=0;d<=Q;d++)k[d]=0;for(d=0;143>=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,J+1,k);for(d=0;d<I;d++)V[2*d+1]=5,V[2*d]=n(d,5);ca=new e(S,da,H+1,J,Q);U=new e(V,Y,0,I,Q);Z=new e([],R,0,L,7);ha=!0}b.l_desc=new g(b.dyn_ltree,ca);b.d_desc=new g(b.dyn_dtree,U);b.bl_desc=new g(b.bl_tree,Z);b.bi_buf=0;b.bi_valid=0;q(b)};
-d._tr_stored_block=C;d._tr_flush_block=function(b,d,e,c){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=A(b));z(b,b.l_desc);z(b,b.d_desc);y(b,b.dyn_ltree,b.l_desc.max_code);y(b,b.dyn_dtree,b.d_desc.max_code);z(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*P[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)C(b,d,e,c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),x(b,S,V);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+
-1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*P[f]+1],3);B(b,b.dyn_ltree,d-1);B(b,b.dyn_dtree,e-1);x(b,b.dyn_ltree,b.dyn_dtree)}q(b);c&&t(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ba[e]+H+1)]++,b.dyn_dtree[2*(256>d?ea[d]:ea[256+(d>>>7)])]++),b.last_lit===
-b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,O,S);16===b.bi_valid?(k(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(c,f,d){f.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(c,f,d){d=c("./lib/utils/common").assign;
+25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,q,t,u,v,x){var m,n,p,z,C,E,F,D,K=x.bits,H,J,I,L,M,Q,X=0,N,G=null,W=0,O=new b.Buf16(16);z=new b.Buf16(16);var ca=null,Y=0;for(H=0;15>=H;H++)O[H]=0;for(J=0;J<q;J++)O[c[f+J]]++;L=K;for(I=15;1<=I&&0===O[I];I--);if(L>I&&(L=I),0===I)return t[u++]=20971520,t[u++]=20971520,x.bits=1,0;for(K=1;K<I&&0===O[K];K++);L<K&&(L=K);for(H=m=1;15>=H;H++)if(m<<=1,m-=O[H],0>m)return-1;if(0<m&&(0===d||1!==I))return-1;z[1]=0;for(H=1;15>H;H++)z[H+1]=z[H]+O[H];for(J=
+0;J<q;J++)0!==c[f+J]&&(v[z[c[f+J]]++]=J);if(0===d?(G=ca=v,C=19):1===d?(G=e,W-=257,ca=g,Y-=257,C=256):(G=k,ca=l,C=-1),N=0,J=0,H=K,z=u,M=L,Q=0,p=-1,X=1<<L,q=X-1,1===d&&852<X||2===d&&592<X)return 1;for(var S=0;;){S++;E=H-Q;v[J]<C?(F=0,D=v[J]):v[J]>C?(F=ca[Y+v[J]],D=G[W+v[J]]):(F=96,D=0);m=1<<H-Q;K=n=1<<M;do n-=m,t[z+(N>>Q)+n]=E<<24|F<<16|D|0;while(0!==n);for(m=1<<H-1;N&m;)m>>=1;if(0!==m?(N&=m-1,N+=m):N=0,J++,0===--O[H]){if(H===I)break;H=c[f+v[J]]}if(H>L&&(N&q)!==p){0===Q&&(Q=L);z+=K;M=H-Q;for(m=1<<M;M+
+Q<I&&(m-=O[M+Q],!(0>=m));)M++,m<<=1;if(X+=1<<M,1===d&&852<X||2===d&&592<X)return 1;p=N&q;t[p]=L<<24|M<<16|z-u|0}}return 0!==N&&(t[z+N]=H-Q<<24|4194304),x.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.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(c,f,d){function b(b){for(var d=b.length;0<=--d;)b[d]=0}function e(b,d,e,c,f){this.static_tree=
+b;this.extra_bits=d;this.extra_base=e;this.elems=c;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,e){b.bi_valid>X-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>X-b.bi_valid,b.bi_valid+=e-X):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=e)}function m(b,d,e){l(b,e[2*d],e[2*d+1])}function n(b,d){var e=0;do e|=1&b,b>>>=1,e<<=1;while(0<
+--d);return e>>>1}function p(b,d,e){var c,f=Array(Q+1),g=0;for(c=1;c<=Q;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=n(f[c]++,c))}function q(b){var d;for(d=0;d<J;d++)b.dyn_ltree[2*d]=0;for(d=0;d<I;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*N]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function t(b){8<b.bi_valid?k(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 u(b,d,e,c){var f=2*d,g=2*e;return b[f]<
+b[g]||b[f]===b[g]&&c[d]<=c[e]}function v(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&u(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!u(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function x(b,d,e){var c,f,g,k,n=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===c?m(b,f,d):(g=Z[f],m(b,g+H+1,d),k=ca[g],0!==k&&(f-=T[g],l(b,f,k)),c--,g=256>c?da[c]:da[256+(c>>>7)],m(b,g,e),k=Y[g],0!==k&&(c-=ba[g],l(b,
+c,k)));while(n<b.last_lit)}m(b,N,d)}function y(b,d){var e,c,f,g=d.dyn_tree;c=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=M;for(e=0;e<l;e++)0!==g[2*e]?(b.heap[++b.heap_len]=m=e,b.depth[e]=0):g[2*e+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=m;for(e=b.heap_len>>1;1<=e;e--)v(b,g,e);f=l;do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],v(b,g,1),c=b.heap[1],b.heap[--b.heap_max]=
+e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,v(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,t=d.stat_desc.static_tree,u=d.stat_desc.has_stree,x=d.stat_desc.extra_bits,y=d.stat_desc.extra_base,z=d.stat_desc.max_length,A=0;for(c=0;c<=Q;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;e<M;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>z&&(c=z,A++),k[2*
+f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=y&&(n=x[f-y]),q=k[2*f],b.opt_len+=q*(c+n),u&&(b.static_len+=q*(t[2*f+1]+n)));if(0!==A){do{for(c=z-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[z]--;A-=2}while(0<A);for(c=z;0!==c;c--)for(f=b.bl_count[c];0!==f;)n=b.heap[--e],n>l||(k[2*n+1]!==c&&(b.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,b.bl_count)}function A(b,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l<m&&
+f===k||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*G]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*O]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function B(b,d,e){var c,f,g=-1,k=d[1],n=0,p=7,q=4;0===k&&(p=138,q=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n<p&&f===k)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==g&&(m(b,f,b.bl_tree),n--),m(b,G,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,O,b.bl_tree),l(b,n-11,7));n=0;g=f;0===k?(p=138,q=
+3):f===k?(p=6,q=3):(p=7,q=4)}}function z(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return F;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(d=32;d<H;d++)if(0!==b.dyn_ltree[2*d])return D;return F}function C(b,d,e,c){l(b,(K<<1)+(c?1:0),3);t(b);k(b,e);k(b,~e);E.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var E=c("../utils/common"),F=0,D=1,K=0,H=256,J=H+1+29,I=30,L=19,M=2*J+1,Q=15,X=16,N=256,G=16,W=17,O=18,ca=[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],Y=[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],S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(J+2));b(R);var V=Array(2*I);b(V);var da=Array(512);b(da);var Z=Array(256);b(Z);var T=Array(29);b(T);var ba=Array(I);b(ba);var ea,U,aa,ha=!1;d._tr_init=function(b){if(!ha){var d,c,f,k=Array(Q+1);for(f=c=0;28>f;f++)for(T[f]=c,d=0;d<1<<ca[f];d++)Z[c++]=f;Z[c-1]=f;for(f=c=0;16>f;f++)for(ba[f]=
+c,d=0;d<1<<Y[f];d++)da[c++]=f;for(c>>=7;f<I;f++)for(ba[f]=c<<7,d=0;d<1<<Y[f]-7;d++)da[256+c++]=f;for(d=0;d<=Q;d++)k[d]=0;for(d=0;143>=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,J+1,k);for(d=0;d<I;d++)V[2*d+1]=5,V[2*d]=n(d,5);ea=new e(R,ca,H+1,J,Q);U=new e(V,Y,0,I,Q);aa=new e([],S,0,L,7);ha=!0}b.l_desc=new g(b.dyn_ltree,ea);b.d_desc=new g(b.dyn_dtree,U);b.bl_desc=new g(b.bl_tree,aa);b.bi_buf=0;b.bi_valid=0;q(b)};
+d._tr_stored_block=C;d._tr_flush_block=function(b,d,e,c){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=z(b));y(b,b.l_desc);y(b,b.d_desc);A(b,b.dyn_ltree,b.l_desc.max_code);A(b,b.dyn_dtree,b.d_desc.max_code);y(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*P[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)C(b,d,e,c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),x(b,R,V);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+
+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*P[f]+1],3);B(b,b.dyn_ltree,d-1);B(b,b.dyn_dtree,e-1);x(b,b.dyn_ltree,b.dyn_dtree)}q(b);c&&t(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(Z[e]+H+1)]++,b.dyn_dtree[2*(256>d?da[d]:da[256+(d>>>7)])]++),b.last_lit===
+b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,N,R);16===b.bi_valid?(k(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(c,f,d){f.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(c,f,d){d=c("./lib/utils/common").assign;
var b=c("./lib/deflate"),e=c("./lib/inflate");c=c("./lib/zlib/constants");var g={};d(g,b,e,c);f.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,c){var f="",d,b,e,g,k,l,m=0;for(null!=c&&c||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),b=a.charCodeAt(m++),e=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|b>>4,k=(b&15)<<2|e>>6,l=e&63,isNaN(b)?k=l=64:isNaN(e)&&(l=64),f=f+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return f},decode:function(a,c){c=null!=c?c:!1;var f="",d,b,e,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),b=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|b>>4,b=(b&15)<<4|g>>2,e=(g&3)<<6|k,f+=String.fromCharCode(d),64!=g&&(f+=String.fromCharCode(b)),64!=k&&(f+=String.fromCharCode(e));c||(f=Base64._utf8_decode(f));return f},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var c="",f=0;f<a.length;f++){var d=a.charCodeAt(f);128>d?c+=String.fromCharCode(d):(127<d&&2048>d?c+=
@@ -254,7 +254,7 @@ post:function(a,c,f,d){return(new mxXmlRequest(a,c)).send(f,d)},submit:function(
equalEntries:function(a,c){if(null==a&&null!=c||null!=a&&null==c||null!=a&&null!=c&&a.length!=c.length)return!1;if(null!=a&&null!=c){var f=0,d;for(d in c)f++;for(d in a)if(f--,!(mxUtils.isNaN(a[d])&&mxUtils.isNaN(c[d])||a[d]==c[d]))return!1}return 0==f},removeDuplicates:function(a){for(var c=new mxDictionary,f=[],d=0;d<a.length;d++)c.get(a[d])||(f.push(a[d]),c.put(a[d],!0));return f},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,c){var f=function(){};f.prototype=c.prototype;
a.prototype=new f;a.prototype.constructor=a},toString:function(a){var c="",f;for(f in a)try{if(null==a[f])c+=f+" = [null]\n";else if("function"==typeof a[f])c+=f+" => [Function]\n";else if("object"==typeof a[f])var d=mxUtils.getFunctionName(a[f].constructor),c=c+(f+" => ["+d+"]\n");else c+=f+" = "+a[f]+"\n"}catch(b){c+=f+"="+b.message}return c},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,c,f,d,b,e,g,k,l){k-=a;l-=c;if(0===f||0===d)return q;
f=Math.abs(f);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(b*Math.PI/180),q=Math.sin(b*Math.PI/180);b=p*m+q*n;var m=-1*q*m+p*n,n=b*b,t=m*m,u=f*f,v=d*d,x=n/u+t/v;1<x?(f*=Math.sqrt(x),d*=Math.sqrt(x),e=0):(x=1,e===g&&(x=-1),e=x*Math.sqrt((u*v-u*t-v*n)/(u*t+v*n)));n=e*f*m/d;t=-1*e*d*b/f;k=p*n-q*t+k/2;l=q*n+p*t+l/2;u=Math.atan2((m-t)/d,(b-n)/f)-Math.atan2(0,1);e=0<=u?u:2*Math.PI+u;u=Math.atan2((-m-t)/d,(-b-n)/f)-Math.atan2((m-t)/d,(b-n)/f);b=0<=u?u:2*Math.PI+u;0==g&&0<b?b-=2*Math.PI:0!=g&&0>b&&(b+=2*Math.PI);
-g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;m=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);n=p*f;p*=d;f*=q;d*=q;for(var z=Math.cos(e),y=Math.sin(e),t=-m*(n*y+d*z),u=-m*(f*y-p*z),q=[],B=0;B<g;++B){e+=b;var z=Math.cos(e),y=Math.sin(e),v=n*z-d*y+k,x=f*z+p*y+l,A=-m*(n*y+d*z),z=-m*(f*y-p*z),y=6*B;q[y]=Number(t+a);q[y+1]=Number(u+c);q[y+2]=Number(v-A+a);q[y+3]=Number(x-z+c);q[y+4]=Number(v+a);q[y+5]=Number(x+c);t=v+A;u=x+z}return q},getBoundingBox:function(a,c,f){var d=null;if(null!=a&&null!=c&&0!=c){c=
+g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;m=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);n=p*f;p*=d;f*=q;d*=q;for(var y=Math.cos(e),A=Math.sin(e),t=-m*(n*A+d*y),u=-m*(f*A-p*y),q=[],B=0;B<g;++B){e+=b;var y=Math.cos(e),A=Math.sin(e),v=n*y-d*A+k,x=f*y+p*A+l,z=-m*(n*A+d*y),y=-m*(f*A-p*y),A=6*B;q[A]=Number(t+a);q[A+1]=Number(u+c);q[A+2]=Number(v-z+a);q[A+3]=Number(x-y+c);q[A+4]=Number(v+a);q[A+5]=Number(x+c);t=v+z;u=x+y}return q},getBoundingBox:function(a,c,f){var d=null;if(null!=a&&null!=c&&0!=c){c=
mxUtils.toRadians(c);var d=Math.cos(c),b=Math.sin(c);f=null!=f?f:new mxPoint(a.x+a.width/2,a.y+a.height/2);var e=new mxPoint(a.x,a.y);c=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(c.x,a.y+a.height);a=new mxPoint(a.x,g.y);e=mxUtils.getRotatedPoint(e,d,b,f);c=mxUtils.getRotatedPoint(c,d,b,f);g=mxUtils.getRotatedPoint(g,d,b,f);a=mxUtils.getRotatedPoint(a,d,b,f);d=new mxRectangle(e.x,e.y,0,0);d.add(new mxRectangle(c.x,c.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,c,f,d){d=null!=d?d:new mxPoint;var b=a.x-d.x;a=a.y-d.y;return new mxPoint(b*c-a*f+d.x,a*c+b*f+d.y)},getPortConstraints:function(a,c,f,d){c=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(c.style,f?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==c)return d;d=c.toString();c=mxConstants.DIRECTION_MASK_NONE;f=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(f=mxUtils.getValue(a.style,
mxConstants.STYLE_ROTATION,0));a=0;45<f?(a=1,135<=f&&(a=2)):-45>f&&(a=3,-135>=f&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:c|=mxConstants.DIRECTION_MASK_EAST;break;case 2:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:c|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_WEST;break;case 1:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:c|=mxConstants.DIRECTION_MASK_EAST;
@@ -527,11 +527,11 @@ mxSvgCanvas2D.prototype.updateText=function(a,c,f,d,b,e,g,k,l,m,n){if(null!=n&&n
mxConstants.ALIGN_CENTER?l-=f/2:b==mxConstants.ALIGN_RIGHT&&(l-=f);a+=l;e==mxConstants.ALIGN_MIDDLE?g-=d/2:e==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(g-=2);c+=g;b=1!=t.scale?"scale("+t.scale+")":"";0!=t.rotation&&this.rotateHtml?(b+="rotate("+t.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*t.scale,(c+d/2)*t.scale,t.rotation,t.rotationCx,t.rotationCy),a=c.x-f*t.scale/2,c=c.y-d*t.scale/2):(a*=t.scale,c*=t.scale);0!=m&&(b+="rotate("+m+","+-l+","+-g+")");
n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(c)+")"+b);p.setAttribute("width",Math.round(Math.max(1,f)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,m,n,p,q){if(this.textEnabled&&null!=b){p=null!=p?p:0;var t=this.state;a+=t.dx;c+=t.dy;if(this.foEnabled&&"html"==l){var u="vertical-align:top;";n?u+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(f)+"px;":"fill"==m?u+="width:"+Math.round(f+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(u+="width:"+Math.round(f+1)+"px;",0<d&&(u+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var u=k&&0<f?u+("width:"+
-Math.round(f+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):u+"white-space:nowrap;",v=this.createElement("g");1>t.alpha&&v.setAttribute("opacity",t.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events","all");u=this.createDiv(b,e,g,u,m);if(null!=u){null!=q&&u.setAttribute("dir",q);v.appendChild(x);this.root.appendChild(v);var z,y;q=z=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
-document?(u.style.visibility="hidden",document.body.appendChild(u)):x.appendChild(u);var B=u;null!=B.firstChild&&"DIV"==B.firstChild.nodeName&&(B=B.firstChild,k&&"break-word"==u.style.wordWrap&&(B.style.width="100%"));A=B.offsetWidth;0==A&&u.parentNode==x&&(u.style.visibility="hidden",document.body.appendChild(u),A=B.offsetWidth);this.cacheOffsetSize&&(v.mxCachedOffsetWidth=A);!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(C=u.style.whiteSpace,u.style.whiteSpace="nowrap",A<
-B.offsetWidth&&(u.style.whiteSpace=C));z=A+z-1;k&&"fill"!=m&&"width"!=m&&(n&&(z=Math.min(z,f)),u.style.width=z+"px");z=B.offsetWidth;y=B.offsetHeight;this.cacheOffsetSize&&(v.mxCachedFinalOffsetWidth=z,v.mxCachedFinalOffsetHeight=y);y-=q;u.parentNode!=x&&(x.appendChild(u),u.style.visibility="")}else{B=document.createElement("div");B.style.cssText=u.getAttribute("style");B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.style.position="absolute";B.style.visibility="hidden";y=document.createElement("div");
-y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.wordWrap=mxConstants.WORD_WRAP;y.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;B.appendChild(y);document.body.appendChild(B);8!=document.documentMode&&9!=document.documentMode&&null!=t.fontBorderColor&&(z+=2,q+=2);if(k&&0<f){var A=y.offsetWidth;if(!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m){var C=B.style.whiteSpace;y.style.whiteSpace="nowrap";A<y.offsetWidth&&(B.style.whiteSpace=C)}n&&(A=Math.min(A,f));B.style.width=A+"px";
-z=y.offsetWidth+z+0;y=y.offsetHeight+q;B.style.display="inline-block";B.style.position="";B.style.visibility="";B.style.width=z+"px";u.setAttribute("style",B.style.cssText)}else z=y.offsetWidth+z,y=y.offsetHeight+q;B.parentNode.removeChild(B);x.appendChild(u)}n&&(y=Math.min(y,d),z=Math.min(z,f));"width"==m?d=y:"fill"!=m&&(f=z,d=y);1>t.alpha&&v.setAttribute("opacity",t.alpha);q=u=0;e==mxConstants.ALIGN_CENTER?u-=f/2:e==mxConstants.ALIGN_RIGHT&&(u-=f);a+=u;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+Math.round(f+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):u+"white-space:nowrap;",v=this.createElement("g");1>t.alpha&&v.setAttribute("opacity",t.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events","all");u=this.createDiv(b,e,g,u,m);if(null!=u){null!=q&&u.setAttribute("dir",q);v.appendChild(x);this.root.appendChild(v);var y,A;q=y=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
+document?(u.style.visibility="hidden",document.body.appendChild(u)):x.appendChild(u);var B=u;null!=B.firstChild&&"DIV"==B.firstChild.nodeName&&(B=B.firstChild,k&&"break-word"==u.style.wordWrap&&(B.style.width="100%"));z=B.offsetWidth;0==z&&u.parentNode==x&&(u.style.visibility="hidden",document.body.appendChild(u),z=B.offsetWidth);this.cacheOffsetSize&&(v.mxCachedOffsetWidth=z);!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(C=u.style.whiteSpace,u.style.whiteSpace="nowrap",z<
+B.offsetWidth&&(u.style.whiteSpace=C));y=z+y-1;k&&"fill"!=m&&"width"!=m&&(n&&(y=Math.min(y,f)),u.style.width=y+"px");y=B.offsetWidth;A=B.offsetHeight;this.cacheOffsetSize&&(v.mxCachedFinalOffsetWidth=y,v.mxCachedFinalOffsetHeight=A);A-=q;u.parentNode!=x&&(x.appendChild(u),u.style.visibility="")}else{B=document.createElement("div");B.style.cssText=u.getAttribute("style");B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.style.position="absolute";B.style.visibility="hidden";A=document.createElement("div");
+A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;B.appendChild(A);document.body.appendChild(B);8!=document.documentMode&&9!=document.documentMode&&null!=t.fontBorderColor&&(y+=2,q+=2);if(k&&0<f){var z=A.offsetWidth;if(!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m){var C=B.style.whiteSpace;A.style.whiteSpace="nowrap";z<A.offsetWidth&&(B.style.whiteSpace=C)}n&&(z=Math.min(z,f));B.style.width=z+"px";
+y=A.offsetWidth+y+0;A=A.offsetHeight+q;B.style.display="inline-block";B.style.position="";B.style.visibility="";B.style.width=y+"px";u.setAttribute("style",B.style.cssText)}else y=A.offsetWidth+y,A=A.offsetHeight+q;B.parentNode.removeChild(B);x.appendChild(u)}n&&(A=Math.min(A,d),y=Math.min(y,f));"width"==m?d=A:"fill"!=m&&(f=y,d=A);1>t.alpha&&v.setAttribute("opacity",t.alpha);q=u=0;e==mxConstants.ALIGN_CENTER?u-=f/2:e==mxConstants.ALIGN_RIGHT&&(u-=f);a+=u;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);c+=q;B=1!=t.scale?"scale("+t.scale+")":"";0!=t.rotation&&this.rotateHtml?(B+="rotate("+t.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*t.scale,(c+d/2)*t.scale,t.rotation,t.rotationCx,t.rotationCy),a=c.x-f*t.scale/2,c=c.y-d*t.scale/2):(a*=t.scale,c*=t.scale);0!=p&&(B+="rotate("+p+","+-u+","+-q+")");v.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+")"+B);x.setAttribute("width",
Math.round(Math.max(1,f)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,c,f,d,b,e,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(x),f.appendChild(a),v.appendChild(f)))}}else this.plainText(a,c,f,d,b,e,g,k,m,n,p,q)}};
mxSvgCanvas2D.prototype.createClip=function(a,c,f,d){a=Math.round(a);c=Math.round(c);f=Math.round(f);d=Math.round(d);for(var b="mx-clip-"+a+"-"+c+"-"+f+"-"+d,e=0,g=b+"-"+e;null!=document.getElementById(g);)g=b+"-"+ ++e;clip=this.createElement("clipPath");clip.setAttribute("id",g);b=this.createElement("rect");b.setAttribute("x",a);b.setAttribute("y",c);b.setAttribute("width",f);b.setAttribute("height",d);clip.appendChild(b);return clip};
@@ -565,11 +565,11 @@ mxVmlCanvas2D.prototype.createDiv=function(a,c,f,d){f=this.createElement("div");
e,f.innerHTML=a);a=f.style;a.fontSize=b.fontSize/this.vmlScale+"px";a.fontFamily=b.fontFamily;a.color=b.fontColor;a.verticalAlign="top";a.textAlign=c||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?b.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
(a.textDecoration="underline");return f};
mxVmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,m,n,p,q){if(this.textEnabled&&null!=b){var t=this.state;if("html"==l){null!=t.rotation&&(c=this.rotatePoint(a,c,t.rotation,t.rotationCx,t.rotationCy),a=c.x,c=c.y);8!=document.documentMode||mxClient.IS_EM?(a*=t.scale,c*=t.scale):(a+=t.dx,c+=t.dy,"fill"!=m&&g==mxConstants.ALIGN_TOP&&--c);l=8!=document.documentMode||mxClient.IS_EM?this.createElement("div"):this.createVmlElement("group");l.style.position="absolute";l.style.display="inline";l.style.left=
-this.format(a)+"px";l.style.top=this.format(c)+"px";l.style.zoom=t.scale;var u=this.createElement("div");u.style.position="relative";u.style.display="inline";var v=mxUtils.getAlignmentAsPoint(e,g),x=v.x,v=v.y;b=this.createDiv(b,e,g,m);e=this.createElement("div");null!=q&&b.setAttribute("dir",q);if(k&&0<f){if(n||(b.style.width=Math.round(f)+"px"),b.style.wordWrap=mxConstants.WORD_WRAP,b.style.whiteSpace="normal","break-word"==b.style.wordWrap){var z=b;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&
-(z.firstChild.style.width="100%")}}else b.style.whiteSpace="nowrap";p=t.rotation+(p||0);this.rotateHtml&&0!=p?(e.style.display="inline",e.style.zoom="1",e.appendChild(b),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?l.appendChild(e):(u.appendChild(e),l.appendChild(u))):8!=document.documentMode||mxClient.IS_EM?(b.style.display="inline",l.appendChild(b)):(u.appendChild(b),l.appendChild(u));"DIV"!=this.root.nodeName?(q=this.createVmlElement("rect"),q.stroked="false",q.filled="false",
-q.appendChild(l),this.root.appendChild(q)):this.root.appendChild(l);n?(b.style.overflow="hidden",b.style.width=Math.round(f)+"px",mxClient.IS_QUIRKS||(b.style.maxHeight=Math.round(d)+"px")):"fill"==m?(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.height=Math.max(0,d)+1+"px"):"width"==m&&(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){z=Math.PI/180*p;p=parseFloat(parseFloat(Math.cos(z)).toFixed(8));
-q=parseFloat(parseFloat(Math.sin(-z)).toFixed(8));z%=2*Math.PI;0>z&&(z+=2*Math.PI);z%=Math.PI;z>Math.PI/2&&(z=Math.PI-z);g=Math.cos(z);var y=Math.sin(z);8!=document.documentMode||mxClient.IS_EM||(b.style.display="inline-block",e.style.display="inline-block",u.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);u=b;null!=u.firstChild&&"DIV"==u.firstChild.nodeName&&(u=u.firstChild);z=u.offsetWidth+3;u=u.offsetHeight;n?(f=Math.min(f,z),u=
-Math.min(u,d)):f=z;k&&(b.style.width=f+"px");mxClient.IS_QUIRKS&&(n||"width"==m)&&u>d&&(u=d,b.style.height=u+"px");d=u;n=(d-d*g+f*-y)/2-q*f*(x+.5)+p*d*(v+.5);k=(f-f*g+d*-y)/2+p*f*(x+.5)+q*d*(v+.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-f/2)*t.scale)+"px",m.style.top=this.format(c+(n-d/2)*t.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(t=8!=document.documentMode||
+this.format(a)+"px";l.style.top=this.format(c)+"px";l.style.zoom=t.scale;var u=this.createElement("div");u.style.position="relative";u.style.display="inline";var v=mxUtils.getAlignmentAsPoint(e,g),x=v.x,v=v.y;b=this.createDiv(b,e,g,m);e=this.createElement("div");null!=q&&b.setAttribute("dir",q);if(k&&0<f){if(n||(b.style.width=Math.round(f)+"px"),b.style.wordWrap=mxConstants.WORD_WRAP,b.style.whiteSpace="normal","break-word"==b.style.wordWrap){var y=b;null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&
+(y.firstChild.style.width="100%")}}else b.style.whiteSpace="nowrap";p=t.rotation+(p||0);this.rotateHtml&&0!=p?(e.style.display="inline",e.style.zoom="1",e.appendChild(b),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?l.appendChild(e):(u.appendChild(e),l.appendChild(u))):8!=document.documentMode||mxClient.IS_EM?(b.style.display="inline",l.appendChild(b)):(u.appendChild(b),l.appendChild(u));"DIV"!=this.root.nodeName?(q=this.createVmlElement("rect"),q.stroked="false",q.filled="false",
+q.appendChild(l),this.root.appendChild(q)):this.root.appendChild(l);n?(b.style.overflow="hidden",b.style.width=Math.round(f)+"px",mxClient.IS_QUIRKS||(b.style.maxHeight=Math.round(d)+"px")):"fill"==m?(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.height=Math.max(0,d)+1+"px"):"width"==m&&(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){y=Math.PI/180*p;p=parseFloat(parseFloat(Math.cos(y)).toFixed(8));
+q=parseFloat(parseFloat(Math.sin(-y)).toFixed(8));y%=2*Math.PI;0>y&&(y+=2*Math.PI);y%=Math.PI;y>Math.PI/2&&(y=Math.PI-y);g=Math.cos(y);var A=Math.sin(y);8!=document.documentMode||mxClient.IS_EM||(b.style.display="inline-block",e.style.display="inline-block",u.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);u=b;null!=u.firstChild&&"DIV"==u.firstChild.nodeName&&(u=u.firstChild);y=u.offsetWidth+3;u=u.offsetHeight;n?(f=Math.min(f,y),u=
+Math.min(u,d)):f=y;k&&(b.style.width=f+"px");mxClient.IS_QUIRKS&&(n||"width"==m)&&u>d&&(u=d,b.style.height=u+"px");d=u;n=(d-d*g+f*-A)/2-q*f*(x+.5)+p*d*(v+.5);k=(f-f*g+d*-A)/2+p*f*(x+.5)+q*d*(v+.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-f/2)*t.scale)+"px",m.style.top=this.format(c+(n-d/2)*t.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(t=8!=document.documentMode||
mxClient.IS_EM?t.scale:1,l.style.left=this.format(a+(k-f/2)*t)+"px",l.style.top=this.format(c+(n-d/2)*t)+"px");e.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+p+", M12="+q+", M21="+-q+", M22="+p+", sizingMethod='auto expand')";e.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(e.style.filter+="alpha(opacity="+100*this.state.alpha+")");e.appendChild(b);b.style.position="";b.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(b.style.verticalAlign=
"top",1>this.state.alpha&&(l.style.filter="alpha(opacity="+100*this.state.alpha+")"),t=b.parentNode,b.style.visibility="hidden",document.body.appendChild(b),f=b.offsetWidth,u=b.offsetHeight,mxClient.IS_QUIRKS&&n&&u>d&&(u=d,b.style.height=u+"px"),d=u,b.style.visibility="",t.appendChild(b),l.style.left=this.format(a+f*x*this.state.scale)+"px",l.style.top=this.format(c+d*v*this.state.scale)+"px"):(1>this.state.alpha&&(b.style.filter="alpha(opacity="+100*this.state.alpha+")"),u.style.left=100*x+"%",u.style.top=
100*v+"%")}else this.plainText(a,c,f,d,mxUtils.htmlEntities(b,!1),e,g,k,l,m,n,p,q)}};
@@ -578,9 +578,9 @@ mxVmlCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,m,n,p,q){k=this.sta
g==mxConstants.ALIGN_BOTTOM?e=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(e=k/2);null!=p&&(f.style.rotation=p,g=Math.PI/180*p,b=Math.sin(g)*e,e*=Math.cos(g));f.appendChild(d);f.style.left=this.format(a-b)+"px";f.style.top=this.format(c+e)+"px";this.root.appendChild(f)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,c){this.graph=a;this.setStates(c)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-F)<z?(l=b-a.getCenterY(),z=Math.abs(b-F),d=!0):Math.abs(b-C)<z?(l=b-a.y,z=Math.abs(b-C),d=!0):Math.abs(b-E)<z&&(l=b-a.y-a.height,z=Math.abs(b-E),d=!0);d&&(t=D,u=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||d},b=function(b,d){b+=this.graph.panDx;var e=!1;Math.abs(b-A)<x?(k=b-a.getCenterX(),x=Math.abs(b-A),e=!0):Math.abs(b-y)<x?(k=b-a.x,x=Math.abs(b-y),e=!0):Math.abs(b-B)<x&&(k=b-a.x-a.width,x=Math.abs(b-B),e=!0);e&&(n=d,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||e},e=this.graph.getView().translate,g=this.graph.getView().scale,k=c.x,l=c.y,m=!1,n=null,p=null,q=!1,t=null,u=null,v=this.getGuideTolerance(),x=v,z=v,v=a.clone();v.x+=c.x;v.y+=c.y;var y=v.x,B=v.x+v.width,A=v.getCenterX(),C=v.y,E=v.y+v.height,F=v.getCenterY();for(c=0;c<this.states.length;c++){var D=this.states[c];null!=D&&(this.horizontal&&(b.call(this,D.getCenterX(),D),b.call(this,D.x,
+mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-F)<y?(l=b-a.getCenterY(),y=Math.abs(b-F),d=!0):Math.abs(b-C)<y?(l=b-a.y,y=Math.abs(b-C),d=!0):Math.abs(b-E)<y&&(l=b-a.y-a.height,y=Math.abs(b-E),d=!0);d&&(t=D,u=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||d},b=function(b,d){b+=this.graph.panDx;var e=!1;Math.abs(b-z)<x?(k=b-a.getCenterX(),x=Math.abs(b-z),e=!0):Math.abs(b-A)<x?(k=b-a.x,x=Math.abs(b-A),e=!0):Math.abs(b-B)<x&&(k=b-a.x-a.width,x=Math.abs(b-B),e=!0);e&&(n=d,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||e},e=this.graph.getView().translate,g=this.graph.getView().scale,k=c.x,l=c.y,m=!1,n=null,p=null,q=!1,t=null,u=null,v=this.getGuideTolerance(),x=v,y=v,v=a.clone();v.x+=c.x;v.y+=c.y;var A=v.x,B=v.x+v.width,z=v.getCenterX(),C=v.y,E=v.y+v.height,F=v.getCenterY();for(c=0;c<this.states.length;c++){var D=this.states[c];null!=D&&(this.horizontal&&(b.call(this,D.getCenterX(),D),b.call(this,D.x,
D),b.call(this,D.x+D.width,D)),this.vertical&&(d.call(this,D.getCenterY(),D),d.call(this,D.y,D),d.call(this,D.y+D.height,D)))}f&&(m||(f=a.x-(this.graph.snap(a.x/g-e.x)+e.x)*g,k=this.graph.snap(k/g)*g-f),q||(e=a.y-(this.graph.snap(a.y/g-e.y)+e.y)*g,l=this.graph.snap(l/g)*g-e));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
[new mxPoint(p,minY),new mxPoint(p,maxY)]:[new mxPoint(p,-this.graph.panDy),new mxPoint(p,g.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(n,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";q||null==this.guideY?null!=this.guideY&&(null!=t&&null!=a&&(minX=Math.min(a.x+k-this.graph.panDx,t.x),maxX=Math.max(a.x+a.width+k-this.graph.panDx,t.x+t.width)),this.guideY.points=null!=minX&&null!=maxX?[new mxPoint(minX,u),
new mxPoint(maxX,u)]:[new mxPoint(-this.graph.panDx,u),new mxPoint(g.scrollWidth-3-this.graph.panDx,u)],this.guideY.stroke=this.getGuideColor(t,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden";c=new mxPoint(k,l)}return c};mxGuide.prototype.getGuideColor=function(a,c){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
@@ -657,19 +657,19 @@ mxRhombus.prototype.paintVertexShape=function(a,c,f,d,b){var e=d/2,g=b/2,k=mxUti
mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,c){null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,c,this.isRounded):this.paintCurvedLine(a,c)};mxPolyline.prototype.paintLine=function(a,c,f){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,c,f,d,!1);a.stroke()};
mxPolyline.prototype.paintCurvedLine=function(a,c){a.begin();var f=c[0],d=c.length;a.moveTo(f.x,f.y);for(f=1;f<d-2;f++){var b=c[f],e=c[f+1];a.quadTo(b.x,b.y,(b.x+e.x)/2,(b.y+e.y)/2)}b=c[d-2];e=c[d-1];a.quadTo(b.x,b.y,e.x,e.y);a.stroke()};
function mxArrow(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.fill=c;this.stroke=f;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=b?b:mxConstants.ARROW_WIDTH;this.spacing=null!=e?e: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,c){var f=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,b=c[0],e=c[c.length-1],g=e.x-b.x,k=e.y-b.y,l=Math.sqrt(g*g+k*k),m=l-2*f-mxConstants.ARROW_SIZE,g=g/l,k=k/l,l=d*k/3,d=-d*g/3,n=b.x-l/2+f*g,b=b.y-d/2+f*k,p=n+l,q=b+d,t=p+m*g,m=q+m*k,u=t+l,v=m+d,x=u-3*l,z=v-3*d;a.begin();a.moveTo(n,b);a.lineTo(p,q);a.lineTo(t,m);a.lineTo(u,v);a.lineTo(e.x-f*g,e.y-f*k);a.lineTo(x,z);a.lineTo(x+l,z+d);a.close();a.fillAndStroke()};
+mxArrow.prototype.paintEdgeShape=function(a,c){var f=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,b=c[0],e=c[c.length-1],g=e.x-b.x,k=e.y-b.y,l=Math.sqrt(g*g+k*k),m=l-2*f-mxConstants.ARROW_SIZE,g=g/l,k=k/l,l=d*k/3,d=-d*g/3,n=b.x-l/2+f*g,b=b.y-d/2+f*k,p=n+l,q=b+d,t=p+m*g,m=q+m*k,u=t+l,v=m+d,x=u-3*l,y=v-3*d;a.begin();a.moveTo(n,b);a.lineTo(p,q);a.lineTo(t,m);a.lineTo(u,v);a.lineTo(e.x-f*g,e.y-f*k);a.lineTo(x,y);a.lineTo(x+l,y+d);a.close();a.fillAndStroke()};
function mxArrowConnector(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.fill=c;this.stroke=f;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=b?b:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=e?e: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 c=this.getEdgeWidth();this.isMarkerStart()&&(c=Math.max(c,this.getStartArrowWidth()));this.isMarkerEnd()&&(c=Math.max(c,this.getEndArrowWidth()));a.grow((c/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,c){var f=this.strokewidth;this.outline&&(f=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+f,b=this.getEndArrowWidth()+f,e=this.outline?this.getEdgeWidth()+f:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+f/2,n=this.startSize+f,f=this.endSize+f,p=this.isArrowRounded(),q=c[c.length-1],t=1;t<c.length-1&&c[t].x==
-c[0].x&&c[t].y==c[0].y;)t++;var u=c[t].x-c[0].x,t=c[t].y-c[0].y,v=Math.sqrt(u*u+t*t);if(0!=v){var x=u/v,z,y=x,B=t/v,A,C=B,v=e*B,E=-e*x,F=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();u=x;t=B;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,x,B,n,d,e,m,!0);else{z=c[0].x+v/2+m*x;A=c[0].y+E/2+m*B;var D=c[0].x-v/2+m*x,K=c[0].y-E/2+m*B;g?(a.moveTo(z,A),F.push(function(){a.lineTo(D,K)})):(a.moveTo(D,K),a.lineTo(z,A))}for(var H=A=z=0,v=0;v<c.length-2;v++)if(E=mxUtils.relativeCcw(c[v].x,
-c[v].y,c[v+1].x,c[v+1].y,c[v+2].x,c[v+2].y),z=c[v+2].x-c[v+1].x,A=c[v+2].y-c[v+1].y,H=Math.sqrt(z*z+A*A),0!=H&&(y=z/H,C=A/H,tmp=Math.max(Math.sqrt((x*y+B*C+1)/2),.04),z=x+y,A=B+C,H=Math.sqrt(z*z+A*A),0!=H)){z/=H;A/=H;var H=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),H=0!=E&&p?Math.max(.1,H):Math.max(tmp,.06),J=c[v+1].x+A*e/2/H,I=c[v+1].y-z*e/2/H;A=c[v+1].x-A*e/2/H;z=c[v+1].y+z*e/2/H;0!=E&&p?-1==E?(E=A+C*e,H=z-y*e,a.lineTo(A+B*e,z-x*e),a.quadTo(J,I,E,H),function(b,d){F.push(function(){a.lineTo(b,
-d)})}(A,z)):(a.lineTo(J,I),function(b,d){var c=J-B*e,f=I+x*e,g=J-C*e,k=I+y*e;F.push(function(){a.quadTo(b,d,c,f)});F.push(function(){a.lineTo(g,k)})}(A,z)):(a.lineTo(J,I),function(b,d){F.push(function(){a.lineTo(b,d)})}(A,z));x=y;B=C}v=e*C;E=-e*y;if(l&&!g)this.paintMarker(a,q.x,q.y,-x,-B,f,b,e,m,!1);else{a.lineTo(q.x-m*y+v/2,q.y-m*C+E/2);var L=q.x-m*y-v/2,M=q.y-m*C-E/2;g?(a.moveTo(L,M),F.splice(0,0,function(){a.moveTo(L,M)})):a.lineTo(L,M)}for(v=F.length-1;0<=v;v--)F[v]();g?(a.end(),a.stroke()):(a.close(),
+c[0].x&&c[t].y==c[0].y;)t++;var u=c[t].x-c[0].x,t=c[t].y-c[0].y,v=Math.sqrt(u*u+t*t);if(0!=v){var x=u/v,y,A=x,B=t/v,z,C=B,v=e*B,E=-e*x,F=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();u=x;t=B;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,x,B,n,d,e,m,!0);else{y=c[0].x+v/2+m*x;z=c[0].y+E/2+m*B;var D=c[0].x-v/2+m*x,K=c[0].y-E/2+m*B;g?(a.moveTo(y,z),F.push(function(){a.lineTo(D,K)})):(a.moveTo(D,K),a.lineTo(y,z))}for(var H=z=y=0,v=0;v<c.length-2;v++)if(E=mxUtils.relativeCcw(c[v].x,
+c[v].y,c[v+1].x,c[v+1].y,c[v+2].x,c[v+2].y),y=c[v+2].x-c[v+1].x,z=c[v+2].y-c[v+1].y,H=Math.sqrt(y*y+z*z),0!=H&&(A=y/H,C=z/H,tmp=Math.max(Math.sqrt((x*A+B*C+1)/2),.04),y=x+A,z=B+C,H=Math.sqrt(y*y+z*z),0!=H)){y/=H;z/=H;var H=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),H=0!=E&&p?Math.max(.1,H):Math.max(tmp,.06),J=c[v+1].x+z*e/2/H,I=c[v+1].y-y*e/2/H;z=c[v+1].x-z*e/2/H;y=c[v+1].y+y*e/2/H;0!=E&&p?-1==E?(E=z+C*e,H=y-A*e,a.lineTo(z+B*e,y-x*e),a.quadTo(J,I,E,H),function(b,d){F.push(function(){a.lineTo(b,
+d)})}(z,y)):(a.lineTo(J,I),function(b,d){var c=J-B*e,f=I+x*e,g=J-C*e,k=I+A*e;F.push(function(){a.quadTo(b,d,c,f)});F.push(function(){a.lineTo(g,k)})}(z,y)):(a.lineTo(J,I),function(b,d){F.push(function(){a.lineTo(b,d)})}(z,y));x=A;B=C}v=e*C;E=-e*A;if(l&&!g)this.paintMarker(a,q.x,q.y,-x,-B,f,b,e,m,!1);else{a.lineTo(q.x-m*A+v/2,q.y-m*C+E/2);var L=q.x-m*A-v/2,M=q.y-m*C-E/2;g?(a.moveTo(L,M),F.splice(0,0,function(){a.moveTo(L,M)})):a.lineTo(L,M)}for(v=F.length-1;0<=v;v--)F[v]();g?(a.end(),a.stroke()):(a.close(),
a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<c.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,c[0].x,c[0].y,u,t,n,d,e,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-x,-B,f,b,e,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,c,f,d,b,e,g,k,l,m){g=k/g;var n=k*b/2;k=-k*d/2;var p=(l+e)*d;e=(l+e)*b;m?a.moveTo(c-n+p,f-k+e):a.lineTo(c-n+p,f-k+e);a.lineTo(c-n/g+p,f-k/g+e);a.lineTo(c+l*d,f+l*b);a.lineTo(c+n/g+p,f+k/g+e);a.lineTo(c+n+p,f+k+e)};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,c,f,d,b,e,g,k,l,m,n,p,q,t,u,v,x,z,y,B,A){mxShape.call(this);this.value=a;this.bounds=c;this.color=null!=b?b:"black";this.align=null!=f?f:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=e?e:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
-this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=t?t:!0;this.background=u;this.border=v;this.wrap=null!=x?x:!1;this.clipped=null!=z?z:!1;this.overflow=null!=y?y:"visible";this.labelPadding=null!=B?B:0;this.textDirection=A;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,c,f,d,b,e,g,k,l,m,n,p,q,t,u,v,x,y,A,B,z){mxShape.call(this);this.value=a;this.bounds=c;this.color=null!=b?b:"black";this.align=null!=f?f:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=e?e:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
+this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=t?t:!0;this.background=u;this.border=v;this.wrap=null!=x?x:!1;this.clipped=null!=y?y:!1;this.overflow=null!=A?A:"visible";this.labelPadding=null!=B?B:0;this.textDirection=z;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,c){var f=this.scale,d=this.bounds.x/f,b=this.bounds.y/f,e=this.bounds.width/f,f=this.bounds.height/f;this.updateTransform(a,d,b,e,f);this.configureCanvas(a,d,b,e,f);var g=null!=this.state?this.state.unscaledWidth:null;if(c)null==this.node.firstChild||null!=g&&this.lastUnscaledWidth==g||a.invalidateCachedOffsetSize(this.node),a.updateText(d,b,e,f,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node);else{var k=mxUtils.isNode(this.value)||
@@ -863,9 +863,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}else for(f++,b=0;b<this.nestedBestRanks.length;b++)for(e=a.ranks[b],g=0;g<e.length;g++)k=e[g],k.setGeneralPurposeVariable(b,g);if(0==d)break}f=[];d=[];for(c=0;c<a.maxRank+1;c++)d[c]=[],f[c]=d[c];for(c=0;c<this.nestedBestRanks.length;c++)for(b=0;b<this.nestedBestRanks[c].length;b++)d[c].push(this.nestedBestRanks[c][b]);a.ranks=f};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var c=a.ranks.length,f=0,d=1;d<c;d++)f+=this.calculateRankCrossing(d,a);return f};
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,c){for(var f=0,d=c.ranks[a],b=c.ranks[a-1],e=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(b,a){return b-a});e[l]=m}d=[];for(g=0;g<e.length;g++)d=d.concat(e[g]);for(e=1;e<b.length;)e<<=1;l=2*e-1;--e;b=[];for(g=0;g<l;++g)b[g]=0;for(g=0;g<d.length;g++)for(l=d[g]+e,++b[l];0<
l;)l%2&&(f+=b[l+1]),l=l-1>>1,++b[l];return f};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;e<c.ranks.length;e++){for(var g=c.ranks[e],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(e);0>n&&(n=l);k[n]=m}for(var p=null,q=null,t,u,v=null,x=null,z,y=null,l=0;l<g.length-1;l++){if(0==l){z=k[l];m=z.getNextLayerConnectedCells(e);n=z.getPreviousLayerConnectedCells(e);t=[];u=[];for(var B=0;B<m.length;B++)t[B]=m[B].getGeneralPurposeVariable(e+1);for(B=
-0;B<n.length;B++)u[B]=n[B].getGeneralPurposeVariable(e-1)}else m=p,n=q,t=v,u=x,z=y;y=k[l+1];p=y.getNextLayerConnectedCells(e);q=y.getPreviousLayerConnectedCells(e);v=[];x=[];for(B=0;B<p.length;B++)v[B]=p[B].getGeneralPurposeVariable(e+1);for(B=0;B<q.length;B++)x[B]=q[B].getGeneralPurposeVariable(e-1);for(var A=0,C=0,B=0;B<t.length;B++)for(var E=0;E<v.length;E++)t[B]>v[E]&&A++,t[B]<v[E]&&C++;for(B=0;B<u.length;B++)for(E=0;E<x.length;E++)u[B]>x[E]&&A++,u[B]<x[E]&&C++;if(C<A||C==A&&b)p=z.getGeneralPurposeVariable(e),
-z.setGeneralPurposeVariable(e,y.getGeneralPurposeVariable(e)),y.setGeneralPurposeVariable(e,p),p=m,q=n,v=t,x=u,y=z,b||(f=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,c){var f=0==a%2;if(f)for(var d=c.maxRank-1;0<=d;d--)this.medianRank(d,f);else for(d=1;d<c.maxRank;d++)this.medianRank(d,f)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;e<c.ranks.length;e++){for(var g=c.ranks[e],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(e);0>n&&(n=l);k[n]=m}for(var p=null,q=null,t,u,v=null,x=null,y,A=null,l=0;l<g.length-1;l++){if(0==l){y=k[l];m=y.getNextLayerConnectedCells(e);n=y.getPreviousLayerConnectedCells(e);t=[];u=[];for(var B=0;B<m.length;B++)t[B]=m[B].getGeneralPurposeVariable(e+1);for(B=
+0;B<n.length;B++)u[B]=n[B].getGeneralPurposeVariable(e-1)}else m=p,n=q,t=v,u=x,y=A;A=k[l+1];p=A.getNextLayerConnectedCells(e);q=A.getPreviousLayerConnectedCells(e);v=[];x=[];for(B=0;B<p.length;B++)v[B]=p[B].getGeneralPurposeVariable(e+1);for(B=0;B<q.length;B++)x[B]=q[B].getGeneralPurposeVariable(e-1);for(var z=0,C=0,B=0;B<t.length;B++)for(var E=0;E<v.length;E++)t[B]>v[E]&&z++,t[B]<v[E]&&C++;for(B=0;B<u.length;B++)for(E=0;E<x.length;E++)u[B]>x[E]&&z++,u[B]<x[E]&&C++;if(C<z||C==z&&b)p=y.getGeneralPurposeVariable(e),
+y.setGeneralPurposeVariable(e,A.getGeneralPurposeVariable(e)),A.setGeneralPurposeVariable(e,p),p=m,q=n,v=t,x=u,A=y,b||(f=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,c){var f=0==a%2;if(f)for(var d=c.maxRank-1;0<=d;d--)this.medianRank(d,f);else for(d=1;d<c.maxRank;d++)this.medianRank(d,f)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,c){for(var f=this.nestedBestRanks[a].length,d=[],b=[],e=0;e<f;e++){var g=this.nestedBestRanks[a][e],k=new MedianCellSorter;k.cell=g;var l;l=c?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=c?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):b[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(e=0;e<f;e++)null==b[e]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
e))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,c){for(var f=[],d=0,b=0;b<a.length;b++){var e=a[b];f[d++]=e.getGeneralPurposeVariable(c)}f.sort(function(b,a){return b-a});if(1==d%2)return f[Math.floor(d/2)];if(2==d)return(f[0]+f[1])/2;b=d/2;e=f[b-1]-f[0];d=f[d-1]-f[b];return(f[b-1]*d+f[b]*e)/(e+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
MedianCellSorter.prototype.compare=function(a,c){return null!=a&&null!=c?c.medianValue>a.medianValue?-1:c.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -878,8 +878,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 c=1E8;if(this.fineTuning)for(var f=0;f<this.maxIterations;f++){0!=f&&(this.medianPos(f,a),this.minNode(a));if(this.currentXDelta<c){for(var d=0;d<a.ranks.length;d++)for(var b=a.ranks[d],e=0;e<b.length;e++){var g=b[e];g.setX(d,g.getGeneralPurposeVariable(d))}c=this.currentXDelta}else for(d=0;d<a.ranks.length;d++)for(b=
a.ranks[d],e=0;e<b.length;e++)g=b[e],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 c=[],f=new mxDictionary,d=[],b=0;b<=a.maxRank;b++){d[b]=a.ranks[b];for(var e=0;e<d[b].length;e++){var g=d[b][e],k=new WeightedCellSorter(g,b);k.rankIndex=e;k.visited=!0;c.push(k);f.put(g,k)}}a=10*c.length;for(e=0;0<c.length&&e<=a;){var g=c.shift(),b=g.cell,l=g.weightedValue,m=parseInt(g.rankIndex),k=b.getNextLayerConnectedCells(l),n=b.getPreviousLayerConnectedCells(l),p=k.length,q=n.length,t=this.medianXValue(k,l+1),u=this.medianXValue(n,
-l-1),v=p+q,x=b.getGeneralPurposeVariable(l),z=x;0<v&&(z=(t*p+u*q)/v);p=!1;z<x-1?0==m?(b.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m-1],x=m.getGeneralPurposeVariable(l),x=x+m.width/2+this.intraCellSpacing+b.width/2,x<z?(b.setGeneralPurposeVariable(l,z),p=!0):x<b.getGeneralPurposeVariable(l)-1&&(b.setGeneralPurposeVariable(l,x),p=!0)):z>x+1&&(m==d[l].length-1?(b.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m+1],x=m.getGeneralPurposeVariable(l),x=x-m.width/2-this.intraCellSpacing-b.width/2,x>z?(b.setGeneralPurposeVariable(l,
-z),p=!0):x>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,x),p=!0)));if(p){for(b=0;b<k.length;b++)l=k[b],l=f.get(l),null!=l&&0==l.visited&&(l.visited=!0,c.push(l));for(b=0;b<n.length;b++)l=n[b],l=f.get(l),null!=l&&0==l.visited&&(l.visited=!0,c.push(l))}g.visited=!1;e++}};mxCoordinateAssignment.prototype.medianPos=function(a,c){if(0==a%2)for(var f=c.maxRank;0<f;f--)this.rankMedianPosition(f-1,c,f);else for(f=0;f<c.maxRank-1;f++)this.rankMedianPosition(f+1,c,f)};
+l-1),v=p+q,x=b.getGeneralPurposeVariable(l),y=x;0<v&&(y=(t*p+u*q)/v);p=!1;y<x-1?0==m?(b.setGeneralPurposeVariable(l,y),p=!0):(m=d[l][m-1],x=m.getGeneralPurposeVariable(l),x=x+m.width/2+this.intraCellSpacing+b.width/2,x<y?(b.setGeneralPurposeVariable(l,y),p=!0):x<b.getGeneralPurposeVariable(l)-1&&(b.setGeneralPurposeVariable(l,x),p=!0)):y>x+1&&(m==d[l].length-1?(b.setGeneralPurposeVariable(l,y),p=!0):(m=d[l][m+1],x=m.getGeneralPurposeVariable(l),x=x-m.width/2-this.intraCellSpacing-b.width/2,x>y?(b.setGeneralPurposeVariable(l,
+y),p=!0):x>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,x),p=!0)));if(p){for(b=0;b<k.length;b++)l=k[b],l=f.get(l),null!=l&&0==l.visited&&(l.visited=!0,c.push(l));for(b=0;b<n.length;b++)l=n[b],l=f.get(l),null!=l&&0==l.visited&&(l.visited=!0,c.push(l))}g.visited=!1;e++}};mxCoordinateAssignment.prototype.medianPos=function(a,c){if(0==a%2)for(var f=c.maxRank;0<f;f--)this.rankMedianPosition(f-1,c,f);else for(f=0;f<c.maxRank-1;f++)this.rankMedianPosition(f+1,c,f)};
mxCoordinateAssignment.prototype.rankMedianPosition=function(a,c,f){c=c.ranks[a];for(var d=[],b={},e=0;e<c.length;e++){var g=c[e];d[e]=new WeightedCellSorter;d[e].cell=g;d[e].rankIndex=e;b[g.id]=d[e];var k;k=f<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[e].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(e=0;e<d.length;e++){var l,g=d[e].cell;l=0;k=f<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
null!=k&&(l=k.length,l=0<l?this.medianXValue(k,f):g.getGeneralPurposeVariable(a));var m=0;k=-1E8;for(var n=d[e].rankIndex-1;0<=n;){var p=b[c[n].id];if(null!=p){var q=p.cell;p.visited?(k=q.getGeneralPurposeVariable(a)+q.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=q.width+this.intraCellSpacing,n--)}}m=0;q=1E8;for(n=d[e].rankIndex+1;n<d.length;)if(p=b[c[n].id],null!=p){var t=p.cell;p.visited?(q=t.getGeneralPurposeVariable(a)-t.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=t.width+
this.intraCellSpacing,n++)}l>=k&&l<=q?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>q&&(g.setGeneralPurposeVariable(a,q),this.currentXDelta+=l-q);d[e].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,c){for(var f=0,d=0;d<c.length;d++){var b=c[d];a.isVertex()&&b.isVertex()?f++:f=a.isEdge()&&b.isEdge()?f+8:f+2}return f};
@@ -899,9 +899,9 @@ mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var c=0;c<a
u;if(t.isVertex()){u=0==k?b.connectsAsSource:b.connectsAsTarget;for(var v=0;v<u.length;v++)if(u[v].source==t||u[v].target==t)e+=u[v].edges.length,q++,g.push(u[v])}else e+=t.edges.length,q++,g.push(t)}b.width>(e+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/e;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=0;m<g.length;m++)for(q=g[m].edges.length,t=this.jettyPositions[g[m].ids[0]],null==t&&(t=[],this.jettyPositions[g[m].ids[0]]=t),m<e/2?
p+=this.prefVertEdgeOff:m>e/2&&(p-=this.prefVertEdgeOff),u=0;u<q;u++)t[4*u+2*k]=n,n+=l,t[4*u+2*k+1]=p}e=b.getNextLayerConnectedCells(c);g=c+1}}};
mxCoordinateAssignment.prototype.setEdgePosition=function(a){var c=0;if(101207!=a.temp[0]){var f=a.maxRank,d=a.minRank;f==d&&(f=a.source.maxRank,d=a.target.minRank);for(var b=0,e=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),q=[],t=a.isReversed;p!=g&&(t=!t);if(null!=e){var u=t?
-2:0,v=t?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[f]:this.rankBottomY[f],x=e[4*b+1+u];t!=l&&(x=-x);var v=v+x,u=e[4*b+u],z=k.model.getTerminal(n,!0);this.layout.isPort(z)&&k.model.getParent(z)==p&&(u=k.view.getState(z),u=null!=u?u.x:p.geometry.x+a.source.width*z.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(u,v)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u,v+x))):(q.push(new mxPoint(v,
-u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(v+x,u)))}u=a.x.length-1;v=x=-1;p=a.maxRank-1;for(t&&(u=0,x=a.x.length,v=1,p=a.minRank+1);a.maxRank!=a.minRank&&u!=x;u+=v){var z=a.x[u]+c,y=(this.rankTopY[p]+this.rankBottomY[p+1])/2,B=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(t)var A=y,y=B,B=A;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(z,y)),q.push(new mxPoint(z,B))):(q.push(new mxPoint(y,z)),q.push(new mxPoint(B,
-z)));this.limitX=Math.max(this.limitX,z);p+=v}null!=e&&(u=t?2:0,v=t?l?this.rankTopY[f]:this.rankBottomY[f]:l?this.rankBottomY[d]:this.rankTopY[d],x=e[4*b+3-u],t!=l&&(x=-x),v-=x,u=e[4*b+2-u],t=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(t)&&k.model.getParent(t)==p&&(u=k.view.getState(t),u=null!=u?u.x:p.geometry.x+a.target.width*t.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+2:0,v=t?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[f]:this.rankBottomY[f],x=e[4*b+1+u];t!=l&&(x=-x);var v=v+x,u=e[4*b+u],y=k.model.getTerminal(n,!0);this.layout.isPort(y)&&k.model.getParent(y)==p&&(u=k.view.getState(y),u=null!=u?u.x:p.geometry.x+a.source.width*y.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(u,v)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u,v+x))):(q.push(new mxPoint(v,
+u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(v+x,u)))}u=a.x.length-1;v=x=-1;p=a.maxRank-1;for(t&&(u=0,x=a.x.length,v=1,p=a.minRank+1);a.maxRank!=a.minRank&&u!=x;u+=v){var y=a.x[u]+c,A=(this.rankTopY[p]+this.rankBottomY[p+1])/2,B=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(t)var z=A,A=B,B=z;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(y,A)),q.push(new mxPoint(y,B))):(q.push(new mxPoint(A,y)),q.push(new mxPoint(B,
+y)));this.limitX=Math.max(this.limitX,y);p+=v}null!=e&&(u=t?2:0,v=t?l?this.rankTopY[f]:this.rankBottomY[f]:l?this.rankBottomY[d]:this.rankTopY[d],x=e[4*b+3-u],t!=l&&(x=-x),v-=x,u=e[4*b+2-u],t=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(t)&&k.model.getParent(t)==p&&(u=k.view.getState(t),u=null!=u?u.x:p.geometry.x+a.target.width*t.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
q.push(new mxPoint(u,v-x)),q.push(new mxPoint(u,v))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(v-x,u)),q.push(new mxPoint(v,u))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);c=0==c?this.parallelEdgeSpacing:0<c?-c:-c+this.parallelEdgeSpacing;b++}a.temp[0]=101207}};
mxCoordinateAssignment.prototype.setVertexLocation=function(a){var c=a.cell,f=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(c,f,d):this.layout.setVertexLocation(c,d,f);this.limitX=Math.max(this.limitX,f+a.width)};
mxCoordinateAssignment.prototype.processReversedEdge=function(a,c){};function WeightedCellSorter(a,c){this.cell=a;this.weightedValue=c}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,c){return null!=a&&null!=c?c.weightedValue>a.weightedValue?-1:c.weightedValue<a.weightedValue?1:c.nudge?-1:1:0};
@@ -1023,10 +1023,10 @@ mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.targetWindow=null;mxP
mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--\x3e');return a};mxPrintPreview.prototype.appendGraph=function(a,c,f,d,b,e){this.graph=a;this.scale=null!=c?c:1/a.pageScale;this.x0=f;this.y0=d;this.open(null,null,b,e)};
mxPrintPreview.prototype.open=function(a,c,f,d){var b=this.graph.cellRenderer.initializeOverlay,e=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(b,a){a.init(b.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(b,a,d,e){a.dialect=b.view.graph.dialect;a.init(b.view.getDrawPane())});this.wnd=null!=c?c:this.wnd;var g=!1;null==this.wnd&&(g=!0,this.wnd=window.open());var k=this.wnd.document;if(g){var l=this.getDoctype();null!=l&&0<l.length&&
k.writeln(l);mxClient.IS_VML?k.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):("CSS1Compat"===document.compatMode&&k.writeln("<!DOCTYPE html>"),k.writeln("<html>"));k.writeln("<head>");this.writeHead(k,a);k.writeln("</head>");k.writeln('<body class="mxPage">')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-=
-q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var t=this.pageFormat.width-2*this.border,u=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var v=Math.max(1,Math.ceil((m.width+this.x0)/t)),x=Math.max(1,Math.ceil((m.height+this.y0)/u));this.pageCount=v*x;var z=mxUtils.bind(this,function(){if(this.pageSelector&&(1<x||1<v)){var b=this.createPageSelector(x,v);k.body.appendChild(b);if(mxClient.IS_IE&&null==k.documentMode||
-5==k.documentMode||8==k.documentMode||7==k.documentMode){b.style.position="absolute";var a=function(){b.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(b){a()});mxEvent.addListener(this.wnd,"resize",function(b){a()})}}}),y=mxUtils.bind(this,function(b,a){null!=this.borderColor&&(b.style.borderColor=this.borderColor,b.style.borderStyle="solid",b.style.borderWidth="1px");b.style.background=this.backgroundColor;if(f||a)b.style.pageBreakAfter=
-"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),k.body.appendChild(b));(f||a)&&this.addPageBreak(k)}),B=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=B)for(var A=0;A<B.length;A++)y(B[A],!0);for(var C=this.getAppendices(this.pageFormat.width,this.pageFormat.height),A=0;A<x;A++){var E=A*u/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<v;a++){if(null==this.wnd)return null;
-var F=a*t/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,D=A*v+a+1,K=new mxRectangle(F,E,t,u),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-F,-E,this.scale,D,b,K);this.printBackgroundImage&&this.insertBackgroundImage(b,-F,-E)}),D);e.setAttribute("id","mxPage-"+D);y(e,null!=C||A<x-1||a<v-1)}}if(null!=C)for(A=0;A<C.length;A++)y(C[A],A<C.length-1);g&&!d&&(this.closeDocument(),z());this.wnd.focus()}catch(H){null!=e&&null!=e.parentNode&&
+q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var t=this.pageFormat.width-2*this.border,u=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var v=Math.max(1,Math.ceil((m.width+this.x0)/t)),x=Math.max(1,Math.ceil((m.height+this.y0)/u));this.pageCount=v*x;var y=mxUtils.bind(this,function(){if(this.pageSelector&&(1<x||1<v)){var b=this.createPageSelector(x,v);k.body.appendChild(b);if(mxClient.IS_IE&&null==k.documentMode||
+5==k.documentMode||8==k.documentMode||7==k.documentMode){b.style.position="absolute";var a=function(){b.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(b){a()});mxEvent.addListener(this.wnd,"resize",function(b){a()})}}}),A=mxUtils.bind(this,function(b,a){null!=this.borderColor&&(b.style.borderColor=this.borderColor,b.style.borderStyle="solid",b.style.borderWidth="1px");b.style.background=this.backgroundColor;if(f||a)b.style.pageBreakAfter=
+"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),k.body.appendChild(b));(f||a)&&this.addPageBreak(k)}),B=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=B)for(var z=0;z<B.length;z++)A(B[z],!0);for(var C=this.getAppendices(this.pageFormat.width,this.pageFormat.height),z=0;z<x;z++){var E=z*u/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<v;a++){if(null==this.wnd)return null;
+var F=a*t/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,D=z*v+a+1,K=new mxRectangle(F,E,t,u),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-F,-E,this.scale,D,b,K);this.printBackgroundImage&&this.insertBackgroundImage(b,-F,-E)}),D);e.setAttribute("id","mxPage-"+D);A(e,null!=C||z<x-1||a<v-1)}}if(null!=C)for(z=0;z<C.length;z++)A(C[z],z<C.length-1);g&&!d&&(this.closeDocument(),y());this.wnd.focus()}catch(H){null!=e&&null!=e.parentNode&&
e.parentNode.removeChild(e)}finally{this.graph.cellRenderer.initializeOverlay=b}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var c=a.createElement("hr");c.className="mxPageBreak";a.body.appendChild(c)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("</body>");a.writeln("</html>");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,c){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=c&&a.writeln(c);a.writeln("</style>")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1037,8 +1037,8 @@ mxPrintPreview.prototype.renderPage=function(a,c,f,d,b,e){e=this.wnd.document;va
c-2*this.border+"px",l.style.overflow="hidden",!mxClient.IS_IE||null!=e.documentMode&&5!=e.documentMode&&8!=e.documentMode&&7!=e.documentMode?(l.style.top=this.border+"px",l.style.left=this.border+"px"):(l.style.marginTop=this.border+"px",l.style.marginLeft=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(l.style.position="absolute"),g.appendChild(l),document.body.appendChild(g),k=l}catch(n){throw g.parentNode.removeChild(g),n;}b(k);return g};
mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
mxPrintPreview.prototype.addGraphFragment=function(a,c,f,d,b,e){var g=this.graph.getView();d=this.graph.container;this.graph.container=b;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,
-c);var u=this.graph.cellRenderer.redraw,v=g.states;a=g.scale;if(this.clipping){var x=new mxRectangle((e.x+t.x)*a,(e.y+t.y)*a,e.width*a/f,e.height*a/f);this.graph.cellRenderer.redraw=function(b,a,d){if(null!=b){var e=v.get(b.cell);if(null!=e&&(e=g.getBoundingBox(e,!1),null!=e&&!mxUtils.intersects(x,e)))return}u.apply(this,arguments)}}a=null;try{var z=[this.getRoot()];a=new mxTemporaryCellStates(g,f,z)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
-"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=e.width+"px",g.canvas.style.height=e.height+"px";else for(f=b.firstChild;null!=f;)z=f.nextSibling,c=f.nodeName.toLowerCase(),"svg"==c?(f.style.overflow="hidden",f.style.position="relative",f.style.top=this.marginTop+"px",f.setAttribute("width",e.width),f.setAttribute("height",e.height),f.style.width="",f.style.height=""):"default"!=f.style.cursor&&"div"!=c&&f.parentNode.removeChild(f),f=z;this.printBackgroundImage&&(b=b.getElementsByTagName("svg"),
+c);var u=this.graph.cellRenderer.redraw,v=g.states;a=g.scale;if(this.clipping){var x=new mxRectangle((e.x+t.x)*a,(e.y+t.y)*a,e.width*a/f,e.height*a/f);this.graph.cellRenderer.redraw=function(b,a,d){if(null!=b){var e=v.get(b.cell);if(null!=e&&(e=g.getBoundingBox(e,!1),null!=e&&!mxUtils.intersects(x,e)))return}u.apply(this,arguments)}}a=null;try{var y=[this.getRoot()];a=new mxTemporaryCellStates(g,f,y)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
+"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=e.width+"px",g.canvas.style.height=e.height+"px";else for(f=b.firstChild;null!=f;)y=f.nextSibling,c=f.nodeName.toLowerCase(),"svg"==c?(f.style.overflow="hidden",f.style.position="relative",f.style.top=this.marginTop+"px",f.setAttribute("width",e.width),f.setAttribute("height",e.height),f.style.width="",f.style.height=""):"default"!=f.style.cursor&&"div"!=c&&f.parentNode.removeChild(f),f=y;this.printBackgroundImage&&(b=b.getElementsByTagName("svg"),
0<b.length&&(b[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(q);this.graph.container=d;this.graph.cellRenderer.redraw=u;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=t;a.destroy();g.setEventsEnabled(p)}};
mxPrintPreview.prototype.insertBackgroundImage=function(a,c,f){var d=this.graph.backgroundImage;if(null!=d){var b=document.createElement("img");b.style.position="absolute";b.style.marginLeft=Math.round(c*this.scale)+"px";b.style.marginTop=Math.round(f*this.scale)+"px";b.setAttribute("width",Math.round(this.scale*d.width));b.setAttribute("height",Math.round(this.scale*d.height));b.src=d.src;a.insertBefore(b,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
@@ -1153,25 +1153,25 @@ c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&
d.y)||mxUtils.contains(c,a,d.y)||b.push(new mxPoint(a,d.y)):(e=Math.max(c.y,f.y),b.push(new mxPoint(a,e+(Math.min(c.y+c.height,f.y+f.height)-e)/2)))))},TopToBottom:function(a,c,f,d,b){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=e.transformControlPoint(a,d));null!=k&&(c=new mxCellState,c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&(k=Math.max(c.y,f.y),g=Math.min(c.y+c.height,f.y+f.height),a=e.getRoutingCenterX(c),
null!=d&&d.x>=c.x&&d.x<=c.x+c.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(f,a,k)||mxUtils.contains(c,a,k)||b.push(new mxPoint(a,k)),a=null!=d&&d.x>=f.x&&d.x<=f.x+f.width?d.x:e.getRoutingCenterX(f),mxUtils.contains(f,a,k)||mxUtils.contains(c,a,k)||b.push(new mxPoint(a,k)),1==b.length&&(null!=d&&1==b.length?mxUtils.contains(f,d.x,k)||mxUtils.contains(c,d.x,k)||b.push(new mxPoint(d.x,k)):(e=Math.max(c.x,f.x),b.push(new mxPoint(e+(Math.min(c.x+c.width,f.x+f.width)-e)/2,k)))))},
SegmentConnector:function(a,c,f,d,b){function e(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)b.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<b.length?b[0]:null,m=!0,n=null,p=g[0];null==p&&null!=c?p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var q=g.length-1;if(null!=d&&0<d.length){for(var n=[],t=0;t<d.length;t++){var u=a.view.transformControlPoint(a,d[t]);null!=u&&(u.x=
-Math.round(u.x),u.y=Math.round(u.y),n.push(u))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));u=g[q];null!=u&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-u.x)<k&&(d[d.length-1].x=u.x),Math.abs(d[d.length-1].y-u.y)<k&&(d[d.length-1].y=u.y));var n=d[0],v=c,x=g[0],z=!1,y=!1,z=n;null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),v=null);for(t=0;2>t;t++){var B=null!=x&&x.x==z.x,A=null!=x&&x.y==z.y,C=null!=v&&z.y>=v.y&&z.y<=v.y+
-v.height,v=null!=v&&z.x>=v.x&&z.x<=v.x+v.width,z=A||null==x&&C,y=B||null==x&&v;if(0!=t||!(z&&y||B&&A)){if(null!=x&&!A&&!B&&(C||v)){m=C?!1:!0;break}if(y||z){m=z;1==t&&(m=0==d.length%2?z:y);break}}v=f;x=g[q];null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),v=null);z=d[d.length-1];B&&A&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&e(new mxPoint(n.x,
+Math.round(u.x),u.y=Math.round(u.y),n.push(u))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));u=g[q];null!=u&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-u.x)<k&&(d[d.length-1].x=u.x),Math.abs(d[d.length-1].y-u.y)<k&&(d[d.length-1].y=u.y));var n=d[0],v=c,x=g[0],y=!1,A=!1,y=n;null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),v=null);for(t=0;2>t;t++){var B=null!=x&&x.x==y.x,z=null!=x&&x.y==y.y,C=null!=v&&y.y>=v.y&&y.y<=v.y+
+v.height,v=null!=v&&y.x>=v.x&&y.x<=v.x+v.width,y=z||null==x&&C,A=B||null==x&&v;if(0!=t||!(y&&A||B&&z)){if(null!=x&&!z&&!B&&(C||v)){m=C?!1:!0;break}if(A||y){m=y;1==t&&(m=0==d.length%2?y:A);break}}v=f;x=g[q];null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),v=null);y=d[d.length-1];B&&z&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&e(new mxPoint(n.x,
p.y));m?p.y=n.y:p.x=n.x;for(t=0;t<d.length;t++)m=!m,n=d[t],m?p.y=n.y:p.x=n.x,e(p.clone())}else n=p,m=!0;p=g[q];null==p&&null!=f&&(p=new mxPoint(a.view.getRoutingCenterX(f),a.view.getRoutingCenterY(f)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[q]&&g[q].y!=n.y||null==g[q]&&null!=f&&(n.y<f.y||n.y>f.y+f.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=f&&(n.x<f.x||n.x>f.x+f.width))&&e(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=c)for(;1<
b.length&&null!=b[1]&&mxUtils.contains(c,b[1].x,b[1].y);)b.splice(1,1);if(null==g[q]&&null!=f)for(;1<b.length&&null!=b[b.length-1]&&mxUtils.contains(f,b[b.length-1].x,b[b.length-1].y);)b.splice(b.length-1,1);null!=u&&null!=b[b.length-1]&&Math.abs(u.x-b[b.length-1].x)<k&&Math.abs(u.y-b[b.length-1].y)<k&&(b.splice(b.length-1,1),null!=b[b.length-1]&&(Math.abs(b[b.length-1].x-u.x)<k&&(b[b.length-1].x=u.x),Math.abs(b[b.length-1].y-u.y)<k&&(b[b.length-1].y=u.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,c,f,d,b){c=mxUtils.getValue(a.style,b?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==c&&(mxUtils.getValue(a.style,b?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,b?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),c=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
-mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},OrthConnector:function(a,c,f,d,b){var e=a.view.graph,g=null==c?!1:e.getModel().isEdge(c.cell),k=null==f?!1:e.getModel().isEdge(f.cell),e=a.absolutePoints,l=e[0],m=e[e.length-1],n=null!=c?c.x:l.x,p=null!=c?c.y:l.y,q=null!=c?c.width:0,t=null!=c?c.height:0,u=null!=f?f.x:m.x,v=null!=f?f.y:m.y,x=null!=f?f.width:0,z=null!=f?f.height:0,e=a.view.scale*mxEdgeStyle.getJettySize(a,c,f,d,!0),y=a.view.scale*mxEdgeStyle.getJettySize(a,
-c,f,d,!1);null!=c&&f==c&&(e=y=Math.max(e,y));var B=y+e,A=!1;if(null!=l&&null!=m)var A=m.x-l.x,C=m.y-l.y,A=A*A+C*C<B*B;if(A||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,c,f,d,b);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=c&&(d[0]=mxUtils.getPortConstraints(c,a,!0,mxConstants.DIRECTION_MASK_ALL),A=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=A&&(A=mxUtils.getBoundingBox(new mxRectangle(n,p,q,t),A),n=A.x,p=A.y,
-q=A.width,t=A.height));null!=f&&(d[1]=mxUtils.getPortConstraints(f,a,!1,mxConstants.DIRECTION_MASK_ALL),A=mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0),0!=A&&(A=mxUtils.getBoundingBox(new mxRectangle(u,v,x,z),A),u=A.x,v=A.y,x=A.width,z=A.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;x=Math.round(10*x)/10;z=Math.round(10*z)/10;a=[0,0];n=[[n,p,q,t],[u,v,x,z]];y=[e,y];for(A=0;2>A;A++)mxEdgeStyle.limits[A][1]=
-n[A][0]-y[A],mxEdgeStyle.limits[A][2]=n[A][1]-y[A],mxEdgeStyle.limits[A][4]=n[A][0]+n[A][2]+y[A],mxEdgeStyle.limits[A][8]=n[A][1]+n[A][3]+y[A];y=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;A=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);C=y-p;y=0;0>A?y=0>C?2:1:0>=C&&(y=3,0==A&&(y=2));p=null;null!=c&&(p=l);c=[[.5,.5],[.5,.5]];for(A=0;2>A;A++)null!=p&&(c[A][0]=(p.x-n[A][0])/n[A][2],1>=Math.abs(p.x-n[A][0])?a[A]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[A][0]-n[A][2])&&(a[A]=mxConstants.DIRECTION_MASK_EAST),
-c[A][1]=(p.y-n[A][1])/n[A][3],1>=Math.abs(p.y-n[A][1])?a[A]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[A][1]-n[A][3])&&(a[A]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=m);A=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-B,0);mxEdgeStyle.vertexSeperations[2]=Math.max(A-B,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-B,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-B,0);B=[];
-f=[];l=[];f[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=A>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=A>=p?A:p;q=[[0,0],[0,0]];t=!1;for(A=0;2>A;A++)0==a[A]&&(0==(f[A]&d[A])&&(f[A]=mxUtils.reversePortConstraints(f[A])),0==(l[A]&d[A])&&(l[A]=mxUtils.reversePortConstraints(l[A])),q[A][0]=l[A],q[A][1]=f[A]);0<p&&0<m&&(0<(f[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
-f[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=f[1],t=!0):0<(l[0]&d[0])&&0<(f[1]&d[1])&&(q[0][0]=l[0],q[0][1]=f[0],q[1][0]=f[1],q[1][1]=l[1],t=!0));0<p&&!t&&(q[0][0]=l[0],q[0][1]=f[0],q[1][0]=l[1],q[1][1]=f[1],t=!0);0<m&&!t&&(q[0][0]=f[0],q[0][1]=l[0],q[1][0]=f[1],q[1][1]=l[1]);for(A=0;2>A;A++)0==a[A]&&(0==(q[A][0]&d[A])&&(q[A][0]=q[A][1]),B[A]=q[A][0]&d[A],B[A]|=(q[A][1]&d[A])<<8,B[A]|=(q[1-A][A]&d[A])<<16,B[A]|=(q[1-A][1-A]&d[A])<<24,0==(B[A]&15)&&(B[A]<<=8),0==(B[A]&3840)&&(B[A]=B[A]&15|B[A]>>8),0==(B[A]&
-983040)&&(B[A]=B[A]&65535|(B[A]&251658240)>>8),a[A]=B[A]&15,d[A]==mxConstants.DIRECTION_MASK_WEST||d[A]==mxConstants.DIRECTION_MASK_NORTH||d[A]==mxConstants.DIRECTION_MASK_EAST||d[A]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[A]=d[A]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];B=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=y;B-=y;1>d&&(d+=4);1>B&&(B+=4);d=mxEdgeStyle.routePatterns[d-1][B-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},OrthConnector:function(a,c,f,d,b){var e=a.view.graph,g=null==c?!1:e.getModel().isEdge(c.cell),k=null==f?!1:e.getModel().isEdge(f.cell),e=a.absolutePoints,l=e[0],m=e[e.length-1],n=null!=c?c.x:l.x,p=null!=c?c.y:l.y,q=null!=c?c.width:0,t=null!=c?c.height:0,u=null!=f?f.x:m.x,v=null!=f?f.y:m.y,x=null!=f?f.width:0,y=null!=f?f.height:0,e=a.view.scale*mxEdgeStyle.getJettySize(a,c,f,d,!0),A=a.view.scale*mxEdgeStyle.getJettySize(a,
+c,f,d,!1);null!=c&&f==c&&(e=A=Math.max(e,A));var B=A+e,z=!1;if(null!=l&&null!=m)var z=m.x-l.x,C=m.y-l.y,z=z*z+C*C<B*B;if(z||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,c,f,d,b);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=c&&(d[0]=mxUtils.getPortConstraints(c,a,!0,mxConstants.DIRECTION_MASK_ALL),z=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=z&&(z=mxUtils.getBoundingBox(new mxRectangle(n,p,q,t),z),n=z.x,p=z.y,
+q=z.width,t=z.height));null!=f&&(d[1]=mxUtils.getPortConstraints(f,a,!1,mxConstants.DIRECTION_MASK_ALL),z=mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0),0!=z&&(z=mxUtils.getBoundingBox(new mxRectangle(u,v,x,y),z),u=z.x,v=z.y,x=z.width,y=z.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;x=Math.round(10*x)/10;y=Math.round(10*y)/10;a=[0,0];n=[[n,p,q,t],[u,v,x,y]];A=[e,A];for(z=0;2>z;z++)mxEdgeStyle.limits[z][1]=
+n[z][0]-A[z],mxEdgeStyle.limits[z][2]=n[z][1]-A[z],mxEdgeStyle.limits[z][4]=n[z][0]+n[z][2]+A[z],mxEdgeStyle.limits[z][8]=n[z][1]+n[z][3]+A[z];A=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;z=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);C=A-p;A=0;0>z?A=0>C?2:1:0>=C&&(A=3,0==z&&(A=2));p=null;null!=c&&(p=l);c=[[.5,.5],[.5,.5]];for(z=0;2>z;z++)null!=p&&(c[z][0]=(p.x-n[z][0])/n[z][2],1>=Math.abs(p.x-n[z][0])?a[z]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[z][0]-n[z][2])&&(a[z]=mxConstants.DIRECTION_MASK_EAST),
+c[z][1]=(p.y-n[z][1])/n[z][3],1>=Math.abs(p.y-n[z][1])?a[z]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[z][1]-n[z][3])&&(a[z]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=m);z=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-B,0);mxEdgeStyle.vertexSeperations[2]=Math.max(z-B,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-B,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-B,0);B=[];
+f=[];l=[];f[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=z>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=z>=p?z:p;q=[[0,0],[0,0]];t=!1;for(z=0;2>z;z++)0==a[z]&&(0==(f[z]&d[z])&&(f[z]=mxUtils.reversePortConstraints(f[z])),0==(l[z]&d[z])&&(l[z]=mxUtils.reversePortConstraints(l[z])),q[z][0]=l[z],q[z][1]=f[z]);0<p&&0<m&&(0<(f[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
+f[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=f[1],t=!0):0<(l[0]&d[0])&&0<(f[1]&d[1])&&(q[0][0]=l[0],q[0][1]=f[0],q[1][0]=f[1],q[1][1]=l[1],t=!0));0<p&&!t&&(q[0][0]=l[0],q[0][1]=f[0],q[1][0]=l[1],q[1][1]=f[1],t=!0);0<m&&!t&&(q[0][0]=f[0],q[0][1]=l[0],q[1][0]=f[1],q[1][1]=l[1]);for(z=0;2>z;z++)0==a[z]&&(0==(q[z][0]&d[z])&&(q[z][0]=q[z][1]),B[z]=q[z][0]&d[z],B[z]|=(q[z][1]&d[z])<<8,B[z]|=(q[1-z][z]&d[z])<<16,B[z]|=(q[1-z][1-z]&d[z])<<24,0==(B[z]&15)&&(B[z]<<=8),0==(B[z]&3840)&&(B[z]=B[z]&15|B[z]>>8),0==(B[z]&
+983040)&&(B[z]=B[z]&65535|(B[z]&251658240)>>8),a[z]=B[z]&15,d[z]==mxConstants.DIRECTION_MASK_WEST||d[z]==mxConstants.DIRECTION_MASK_NORTH||d[z]==mxConstants.DIRECTION_MASK_EAST||d[z]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[z]=d[z]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];B=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=A;B-=A;1>d&&(d+=4);1>B&&(B+=4);d=mxEdgeStyle.routePatterns[d-1][B-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+e;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=e}e=0;f=B=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(A=0;A<d.length;A++)l=d[A]&15,t=l==mxConstants.DIRECTION_MASK_EAST?3:l,t+=y,4<t&&(t-=4),m=mxEdgeStyle.dirVectors[t-1],l=0<t%2?0:1,l!=B&&(e++,mxEdgeStyle.wayPoints1[e][0]=mxEdgeStyle.wayPoints1[e-1][0],mxEdgeStyle.wayPoints1[e][1]=mxEdgeStyle.wayPoints1[e-1][1]),u=0<(d[A]&mxEdgeStyle.TARGET_MASK),v=0<(d[A]&mxEdgeStyle.SOURCE_MASK),p=(d[A]&mxEdgeStyle.SIDE_MASK)>>5,p<<=y,15<p&&(p>>=4),q=0<(d[A]&mxEdgeStyle.CENTER_MASK),(v||u)&&9>p?(t=v?0:1,p=q&&0==l?n[t][0]+c[t][0]*n[t][2]:q?n[t][1]+c[t][1]*
-n[t][3]:mxEdgeStyle.limits[t][p],0==l?(p=(p-mxEdgeStyle.wayPoints1[e][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[e][0]+=m[0]*p)):(p=(p-mxEdgeStyle.wayPoints1[e][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[e][1]+=m[1]*p))):q&&(mxEdgeStyle.wayPoints1[e][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[t]/2),mxEdgeStyle.wayPoints1[e][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[t]/2)),0<e&&mxEdgeStyle.wayPoints1[e][l]==mxEdgeStyle.wayPoints1[e-1][l]?e--:B=l;for(A=0;A<=e&&(A!=e||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
-mxConstants.DIRECTION_MASK_WEST))?0:1)==f?0:1)==(e+1)%2);A++)b.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[A][0]),Math.round(mxEdgeStyle.wayPoints1[A][1])));for(a=1;a<b.length;)null==b[a-1]||null==b[a]||b[a-1].x!=b[a].x||b[a-1].y!=b[a].y?a++:b.splice(a,1)}},getRoutePattern:function(a,c,f,d){var b=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];b-=c;a-=c;1>b&&(b+=4);1>a&&(a+=4);c=routePatterns[b-1][a-1];0!=f&&0!=d||null==inlineRoutePatterns[b-1][a-
+0:1;for(z=0;z<d.length;z++)l=d[z]&15,t=l==mxConstants.DIRECTION_MASK_EAST?3:l,t+=A,4<t&&(t-=4),m=mxEdgeStyle.dirVectors[t-1],l=0<t%2?0:1,l!=B&&(e++,mxEdgeStyle.wayPoints1[e][0]=mxEdgeStyle.wayPoints1[e-1][0],mxEdgeStyle.wayPoints1[e][1]=mxEdgeStyle.wayPoints1[e-1][1]),u=0<(d[z]&mxEdgeStyle.TARGET_MASK),v=0<(d[z]&mxEdgeStyle.SOURCE_MASK),p=(d[z]&mxEdgeStyle.SIDE_MASK)>>5,p<<=A,15<p&&(p>>=4),q=0<(d[z]&mxEdgeStyle.CENTER_MASK),(v||u)&&9>p?(t=v?0:1,p=q&&0==l?n[t][0]+c[t][0]*n[t][2]:q?n[t][1]+c[t][1]*
+n[t][3]:mxEdgeStyle.limits[t][p],0==l?(p=(p-mxEdgeStyle.wayPoints1[e][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[e][0]+=m[0]*p)):(p=(p-mxEdgeStyle.wayPoints1[e][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[e][1]+=m[1]*p))):q&&(mxEdgeStyle.wayPoints1[e][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[t]/2),mxEdgeStyle.wayPoints1[e][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[t]/2)),0<e&&mxEdgeStyle.wayPoints1[e][l]==mxEdgeStyle.wayPoints1[e-1][l]?e--:B=l;for(z=0;z<=e&&(z!=e||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
+mxConstants.DIRECTION_MASK_WEST))?0:1)==f?0:1)==(e+1)%2);z++)b.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[z][0]),Math.round(mxEdgeStyle.wayPoints1[z][1])));for(a=1;a<b.length;)null==b[a-1]||null==b[a]||b[a-1].x!=b[a].x||b[a-1].y!=b[a].y?a++:b.splice(a,1)}},getRoutePattern:function(a,c,f,d){var b=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];b-=c;a-=c;1>b&&(b+=4);1>a&&(a+=4);c=routePatterns[b-1][a-1];0!=f&&0!=d||null==inlineRoutePatterns[b-1][a-
1]||(c=inlineRoutePatterns[b-1][a-1]);return c}},mxStyleRegistry={values:[],putValue:function(a,c){mxStyleRegistry.values[a]=c},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var c in mxStyleRegistry.values)if(mxStyleRegistry.values[c]==a)return c;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);
mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;
@@ -1997,6 +1997,7 @@ Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYA
Editor.zoomOutLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABJklEQVQ4y4WT2XaDMAxEvWD2nSSUNEnTJN3r//+9Sj7ILAY6L0ijC4ONYVZRpo6cByrz2YKSUGorGTpz71lPVHvT+avoB5wIkU/mxk8veceSuNoLg44IzziXjvpih72wKQnm8yc2UoiP/LAd8jQfe2Xf4Pq+2EyYIvv9wbzHHCgwxDdlBtWZOdqDfTCVgqpygQpsZaojVAVc9UjQxnAJDIBhiQv84tq3gMQCAVTxVoSibXJf8tMuc7e1TB/DCmejBNg/w1Y3c+AM5vv4w7xM59/oXamrHaLVqPQ+OTCnmMZxgz0SdL5zji0/ld6j88qGa5KIiBB6WeJGKfUKwSMKLuXgvl1TW0tm5R9UQL/efSDYsnzxD8CinhBsTTdugJatKpJwf8v+ADb8QmvW7AeAAAAAAElFTkSuQmCC";
Editor.zoomInLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABKElEQVQ4y4WT6WKCMBCENwkBwn2oFKvWqr3L+79es4EkQIDOH2d3Pxk2ABiJlB8JCXjqw4LikHVGLHTm3nM3UeVN5690GBBN0GwyV/3kkrUQR+WeKnREeKpzaXWd77CmJiXGfPIEI4V4yQ9TIW/ntlcMBe731Vts9w5TWG8F5j3mQI4hvrKpdGeYA7CX9qAcl650gVJartxRuhyHVghF8idQAIbFLvCLu28BsQEC6aKtCK6Pyb3JT7PmbmtNH8Ny56CotD/2qOs5cJbuffxgXmCib+xddVU5RNOhkvvkhTlFehzVWCOh3++MYElOhfdovaImnRYVmqDdsuhNp1QrBBE6uGC2+3ZNjGdg5B94oD+9uyVgWT79BwAxEBTWdOu3bWBVgsn/N/AHUD9IC01Oe40AAAAASUVORK5CYII=";
Editor.actualSizeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABIUlEQVQ4y4WT2XqDIBCFBxDc9yTWNEnTJN3r+79eGT4BEbXnaubMr8dBBaM450dCQp4LWFAascGIRd48eB4cNYE7f6XjgGiCFs5c+dml6CFN6j1V6IQIlHPpdV/usKcmJcV88gQTRXjLD9Mhb+fWq8YG9/uCmTCFjeeDeY85UGKIUGUuqzN42kv7oCouq9oHamlzVR1lVfpAIu1QVRiW+sAv7r4FpAYIZZVsRXB9TP5Dfpo1d1trCgzz1iiptH/sUbdz4CzN9+mLeXHn3+hdddd4RDegsrvzwZwSs2GLPRJidAqCLTlVwaMPqpYMWjTWBB2WRW86pVkhSKyDK2bdt2tmagZG4sBD/evdLQHLEvQfAOKRoLCmG1FAB6uKmby+gz+REDn7O5+EwQAAAABJRU5ErkJggg==";
+Editor.printLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAXVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9RKvvlAAAAHnRSTlMAydnl77qbMLT093H7K4Nd4Ktn082+lYt5bkklEgP44nQSAAAApUlEQVQ4y73P2Q6DIBRF0cOgbRHHzhP//5m9mBAQKjG1cT0Yc7ITAMu1LNQgUZiQ2DYoNQ0sCQb6qgHAfRx48opq3J9AZ6xuF7uOew8Ik1OsCZRS2UAC9V+D9a+QZYxNA45YFQftPtSkATOhw7dAc0vPBwKWiIOjP0JZ0yMuQJ27g36DipOUsqRAM0dR8KD1/ILHaHSE/w8DIx09E3g/BTce6rHUB5sAPKvfF+JdAAAAAElFTkSuQmCC";
Editor.layersLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAmVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v7///+bnZkkAAAAMnRSTlMABPr8ByiD88KsTi/rvJb272mjeUA1CuPe1M/KjVxYHxMP6KZ0S9nYzGRGGRaznpGIbzaGUf0AAAHESURBVDjLbZLZYoIwEEVDgLCjbKIgAlqXqt3m/z+uNwu1rcyDhjl3ktnYL7OY254C0VX3yWFZfzDrOClbbgKxi0YDHjwl4jbnRkXxJS/C1YP3DbBhD1n7Ex4uaAqdVDb3yJ/4J/3nJD2to/ngQz/DfUvzMp4JJ5sSCaF5oXmemgQDfDxzbi+Kq4sU+vNcuAmx94JtyOP2DD4Epz2asWSCz4Z/4fECxyNj9zC9xNLHcdPEO+awDKeSaUu0W4twZQiO2hYVisTR3RCtK/c1X6t4xMEpiGqXqVntEBLolkZZsKY4QtwH6jzq67dEHlJysB1aNOD3XT7n1UkasQN59L4yC2RELMDSeCRtz3yV22Ub3ozIUTknYx8JWqDdQxbUes98cR2kZtUSveF/bAhcedwEWmlxIkpZUy4XOCb6VBjjxHvbwo/1lBAHHi2JCr0NI570QhyHq/DhJoE2lLgyA4RVe6KmZ47O/3b86MCP0HWa73A8/C3SUc5Qc1ajt6fgpXJ+RGpMvDSchepZDOOQRcZVIKcK90x2D7etqtI+56+u6n3sPriO6nfphitR4+O2m3EbM7lh3me1FM1o+LMI887rN+s3/wZdTFlpNVJiOAAAAABJRU5ErkJggg==";
Editor.closeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAUVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////8IN+deAAAAGnRSTlMAuvAIg/dDM/QlOeuFhj0S5s4vKgzjxJRQNiLSey0AAADNSURBVDjLfZLbEoMgDEQjRRRs1XqX///QNmOHJSnjPkHOGR7IEmeoGtJZstnwjqbRfIsmgEdtPCqe9Ynz7ZSc07rE2QiSc+qv8TvjRXA2PDUm3dpe82iJhOEUfxJJo3aCv+jKmRmH4lcCjCjeh9GWOdL/GZZkXH3PYYDrHBnfc4D/RVZf5sjoC1was+Y6HQxwaUxFvq/a0Pv343VCTxfBSRiB+ab3M3eiQZXmMNBJ3Y8pGRZtYQ7DgHMXJEdPLTaN/qBjzJOBc3nmNcbsA16bMR0oLqf+AAAAAElFTkSuQmCC";
Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAgMAAAAOFJJnAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAgJsrThgAAABcSURBVBjThc6xDcAgDATAd8MQTEPW8TRUmYCGnzLRYyOlIV+dZFtvkICTFGqiJEzAG0/Uje9oL+e5Vu4F5yUYJxxqGKhQZ0eBvmgwYQLQaARKD1hbiPyDR0QOeAC31EyNe5X/kAAAAABJRU5ErkJggg==";Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFZJREFUOMvdkskRgDAMA4lDwg2B7b9XOlge/KKvdsa25KFb5XlRvxXC/DNBEv8IFNjBgGdDgXtFgTyhwDXiQAUHCvwa4Uv6mR6UR+1led2mVonvl+tML45qCQNQLIx7AAAAAElFTkSuQmCC";
@@ -2018,6 +2019,43 @@ a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.backg
Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,b){c.undoableEditHappened(b.getProperty("edit"))};var f=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),c=a.getModel(),f=[],l=0;l<e.length;l++)(c.isVertex(e[l])||c.isEdge(e[l]))&&null!=a.view.getState(e[l])&&
f.push(e[l]);a.setSelectionCells(f)};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};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,c,f,d,b,e,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);f+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(1,Math.round((document.body.scrollWidth-f-64)/2)),n=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
+l.style.width=f+"px";l.style.height=d+"px";l.style.left=m+"px";l.style.top=n+"px";l.style.zIndex=this.zIndex;null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.left="0px",this.bg.style.top="0px",this.bg.style.bottom="0px",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));b&&document.body.appendChild(this.bg);l.appendChild(c);
+document.body.appendChild(l);e&&(c=document.createElement("img"),c.setAttribute("src",Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("close")),c.className="geDialogClose",c.style.top=n+14+"px",c.style.left=m+f+38-k+"px",c.style.zIndex=this.zIndex,mxEvent.addListener(c,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(c),this.dialogImg=c,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.onDialogClose=
+g;this.container=l;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+
+"/clear.gif";
+Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
+"/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);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,c){this.create(a,c)};
+PrintDialog.prototype.create=function(a){function c(b){var a=k.checked||m.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=.75*d,e=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,c=1/f.pageScale;if(a){var g=k.checked?1:parseInt(n.value);isNaN(g)||(c=mxUtils.getScaleForPageCount(g,f,e))}f.getGraphBounds();var l=g=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*d);e.height=Math.ceil(e.height*d);c*=d;!a&&f.pageVisible?(d=f.getPageLayout(),g-=d.x*e.width,l-=d.y*e.height):
+a=!0;a=PrintDialog.createPrintPreview(f,c,e,0,g,l,a);a.open();b&&PrintDialog.printPreview(a)}var f=a.editor.graph,d,b,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");b=document.createElement("td");b.setAttribute("colspan","2");b.style.fontSize="10pt";b.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("fitPage"));
+b.appendChild(l);mxEvent.addListener(l,"click",function(b){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(b)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(b);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");b=document.createElement("td");b.style.fontSize="10pt";b.appendChild(m);l=document.createElement("span");mxUtils.write(l," "+mxResources.get("posterPrint")+":");b.appendChild(l);mxEvent.addListener(l,
+"click",function(b){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(b)});d.appendChild(b);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";b=document.createElement("td");b.style.fontSize="10pt";b.appendChild(n);mxUtils.write(b," "+mxResources.get("pages")+" (max)");d.appendChild(b);g.appendChild(d);mxEvent.addListener(m,"change",
+function(){m.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);b=document.createElement("td");mxUtils.write(b,mxResources.get("pageScale")+":");d.appendChild(b);b=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";b.appendChild(p);d.appendChild(b);g.appendChild(d);d=document.createElement("tr");b=document.createElement("td");b.colSpan=2;
+b.style.paddingTop="20px";b.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&b.appendChild(l);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});q.className="geBtn";b.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||
+b.appendChild(l);d.appendChild(b);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}};
+PrintDialog.createPrintPreview=function(a,c,f,d,b,e,g){c=new mxPrintPreview(a,c,f,d,b,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=g;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var k=c.writeHead;c.writeHead=function(b){k.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
+PrintDialog.previewEnabled=!0;
+var PageSetupDialog=function(a){function c(){null==n||n==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=n,m.style.backgroundImage="")}function f(){null==t?(q.removeAttribute("title"),q.style.fontSize="",q.innerHTML=mxResources.get("change")+"..."):(q.setAttribute("title",t.src),q.style.fontSize="11px",q.innerHTML=t.src.substring(0,42)+"...")}var d=a.editor.graph,b,e,g=document.createElement("table");g.style.width=
+"100%";g.style.height="100%";var k=document.createElement("tbody");b=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");b.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var l=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",d.pageFormat);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");
+mxUtils.write(e,mxResources.get("background")+":");b.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="18px";m.style.height="18px";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var n=d.background;c();mxEvent.addListener(m,"click",function(b){a.pickColor(n||"none",function(b){n=b;c()});mxEvent.consume(b)});
+e.appendChild(m);mxUtils.write(e,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();e.appendChild(p);mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?d.getGridSize():b)});b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
+":");b.appendChild(e);e=document.createElement("td");var q=document.createElement("a");q.style.textDecoration="underline";q.style.cursor="pointer";q.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(q,"click",function(b){a.showBackgroundImageDialog(function(b){t=b;f()});mxEvent.consume(b)});f();e.appendChild(q);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var u=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&e.appendChild(u);var v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=n&&a.setBackgroundColor(n);d.backgroundImage!==t&&a.setBackgroundImage(t);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(u);b.appendChild(e);k.appendChild(b);g.appendChild(k);
+this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function b(b,a,d){if(d||p!=document.activeElement&&q!=document.activeElement){b=!1;for(a=0;a<u.length;a++)d=u[a],A?"custom"==d.key&&(k.value=d.key,A=!1):null!=d.format&&(f.width==d.format.width&&f.height==d.format.height?(k.value=d.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,b=!0):f.width==d.format.height&&f.height==d.format.width&&(k.value=d.key,e.removeAttribute("checked"),
+e.defaultChecked=!1,e.checked=!1,g.setAttribute("checked","checked"),g.defaultChecked=!0,b=g.checked=!0));b?(l.style.display="",n.style.display="none"):(p.value=f.width,q.value=f.height,y.setAttribute("selected","selected"),e.setAttribute("checked","checked"),e.defaultChecked=!0,l.style.display="none",n.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var g=document.createElement("input");
+g.setAttribute("name",c);g.setAttribute("type","radio");g.setAttribute("value","landscape");var k=document.createElement("select");k.style.marginBottom="8px";k.style.width="202px";var l=document.createElement("div");l.style.marginLeft="4px";l.style.width="210px";l.style.height="24px";e.style.marginRight="6px";l.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));l.appendChild(c);g.style.marginLeft="10px";g.style.marginRight="6px";l.appendChild(g);
+var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));l.appendChild(m);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var p=document.createElement("input");p.setAttribute("size","6");p.setAttribute("value",f.width);n.appendChild(p);mxUtils.write(n," x ");var q=document.createElement("input");q.setAttribute("size","6");q.setAttribute("value",f.height);n.appendChild(q);mxUtils.write(n," pt");
+l.style.display="none";n.style.display="none";for(var t={},u=PageSetupDialog.getFormats(),v=0;v<u.length;v++){var x=u[v];t[x.key]=x;var y=document.createElement("option");y.setAttribute("value",x.key);mxUtils.write(y,x.title);k.appendChild(y)}var A=!1;b();a.appendChild(k);mxUtils.br(a);a.appendChild(l);a.appendChild(n);var B=f,z=function(){var b=t[k.value];null!=b.format?(p.value=b.format.width,q.value=b.format.height,n.style.display="none",l.style.display=""):(l.style.display="none",n.style.display=
+"");b=new mxRectangle(0,0,parseInt(p.value),parseInt(q.value));"custom"!=k.value&&g.checked&&(b=new mxRectangle(0,0,b.height,b.width));if(b.width!=B.width||b.height!=B.height)B=b,null!=d&&d(B)};mxEvent.addListener(c,"click",function(b){e.checked=!0;z();mxEvent.consume(b)});mxEvent.addListener(m,"click",function(b){g.checked=!0;z();mxEvent.consume(b)});mxEvent.addListener(p,"blur",z);mxEvent.addListener(p,"click",z);mxEvent.addListener(q,"blur",z);mxEvent.addListener(q,"click",z);mxEvent.addListener(g,
+"change",z);mxEvent.addListener(e,"change",z);mxEvent.addListener(k,"change",function(){A="custom"==k.value;z()});z();return{set:function(a){f=a;b(null,null,!0)},get:function(){return B},widthInput:p,heightInput:q}};
+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:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1652)},{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,584,826)},{key:"custom",title:mxResources.get("custom"),format:null}]};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph;if(null!=b.container&&!b.transparentBackground){if(b.pageVisible){var a=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var d=b.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(this.backgroundPageShape=this.createBackgroundPageShape(a),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(b.container),d.style.position="absolute",b.container.insertBefore(this.backgroundPageShape.node,d),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(a){b.dblClick(a)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(a){b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),
mxUtils.bind(this,function(a){null!=b.tooltipHandler&&b.tooltipHandler.isHideOnHover()&&b.tooltipHandler.hide();b.isMouseDown&&!mxEvent.isConsumed(a)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=a,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
@@ -2026,7 +2064,7 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(b.container.className="geDiagramContainer",d.style.backgroundPosition=c,d.style.backgroundColor=a,d.style.backgroundImage=e)};mxGraphView.prototype.createSvgGrid=function(b){for(var a=this.graph.gridSize*this.scale;a<this.minGridSize;)a*=2;for(var d=this.gridSteps*a,e=[],c=1;c<this.gridSteps;c++){var f=c*a;e.push("M 0 "+f+" L "+d+" "+f+" M "+f+" 0 L "+f+" "+d)}return'<svg width="'+d+'" height="'+d+'" xmlns="'+
mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+e.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=this.view.canvas;null!=
e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(b,a,d){var e=this.view.scale,c=this.view.translate,f=this.pageFormat,g=e*this.pageScale,k=this.view.getBackgroundPageBounds();a=k.width;d=k.height;var l=new mxRectangle(e*c.x,e*
-c.y,f.width*g,f.height*g),m=(b=b&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(d/l.height)-1:0,z=b?Math.ceil(a/l.width)-1:0,y=k.x+a,B=k.y+d;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var a=b==this.horizontalPageBreaks?m:z,d=0;d<=a;d++){var e=b==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),Math.round(k.y+(d+1)*l.height)),new mxPoint(Math.round(y),
+c.y,f.width*g,f.height*g),m=(b=b&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(d/l.height)-1:0,y=b?Math.ceil(a/l.width)-1:0,A=k.x+a,B=k.y+d;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<y&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var a=b==this.horizontalPageBreaks?m:y,d=0;d<=a;d++){var e=b==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),Math.round(k.y+(d+1)*l.height)),new mxPoint(Math.round(A),
Math.round(k.y+(d+1)*l.height))]:[new mxPoint(Math.round(k.x+(d+1)*l.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(d+1)*l.width),Math.round(B))];null!=b[d]?(b[d].points=e,b[d].redraw()):(e=new mxPolyline(e,this.pageBreakColor),e.dialect=this.dialect,e.isDashed=this.pageBreakDashed,e.pointerEvents=!1,e.init(this.view.backgroundPane),e.redraw(),b[d]=e)}for(d=a;d<b.length;d++)b[d].destroy();b.splice(a,b.length-a)}});b(this.horizontalPageBreaks);b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,a,d){for(var e=0;e<a.length;e++)if(this.graph.getModel().isVertex(a[e])){var f=this.graph.getCellGeometry(a[e]);if(null!=f&&f.relative)return!1}return c.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=f.apply(this,arguments);b.intersects=mxUtils.bind(this,function(a,d){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});
return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),a=0<b.width?b.x/this.scale-this.translate.x:0,d=0<b.height?b.y/this.scale-this.translate.y:0,e=this.graph.pageFormat,c=this.graph.pageScale,f=e.width*c,e=e.height*c,c=Math.floor(Math.min(0,a)/f),g=Math.floor(Math.min(0,d)/e);return new mxRectangle(this.scale*(this.translate.x+c*f),this.scale*(this.translate.y+
@@ -2044,13 +2082,13 @@ function(b){return k.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxE
if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;c<p.length;c++)this.toolbar.container.appendChild(p[c]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=b;n=e;p=a}}),t=this,u=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){u.apply(this,arguments);q();if(d.cellEditor.isContentEditing()){var b=!1,a=function(){b||(b=!0,window.setTimeout(function(){for(var a=d.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;
if(null!=a&&(a=mxUtils.getCurrentStyle(a),null!=a&&null!=t.toolbar)){var e=a.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));t.toolbar.setFontName(e);t.toolbar.setFontSize(parseInt(a.fontSize))}b=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",a);mxEvent.addListener(d.cellEditor.textarea,"touchend",a);mxEvent.addListener(d.cellEditor.textarea,"mouseup",a);mxEvent.addListener(d.cellEditor.textarea,"keyup",a);a()}};var v=d.cellEditor.stopEditing;
d.cellEditor.stopEditing=function(b,a){v.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var x=d.fireMouseEvent;d.fireMouseEvent=function(b,a,d){b==mxEvent.MOUSE_DOWN&&this.container.focus();x.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,a,d){this.menus.createPopupMenu(b,a,d)}));
-mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var z="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(b){var a=d.view.getState(b);if(null!=a){b=b.clone();b.style="";b=d.getCellStyle(b);var e=[],c=[],f;for(f in a.style)b[f]!=a.style[f]&&(e.push(a.style[f]),
+mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var y="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),A="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(b){var a=d.view.getState(b);if(null!=a){b=b.clone();b.style="";b=d.getCellStyle(b);var e=[],c=[],f;for(f in a.style)b[f]!=a.style[f]&&(e.push(a.style[f]),
c.push(f));f=d.getModel().getStyle(a.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],m=l.indexOf("=");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=b[f]&&"none"==l&&(e.push(l),c.push(f)))}d.getModel().isEdge(a.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",c,"values",e,"cells",[a.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle=d.defaultVertexStyle;this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]))};var B=["fontFamily","fontSize","fontColor"],A="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],B,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)z.push(C[a][c]);for(a=0;a<y.length;a++)z.push(y[a]);var E=function(b,a){d.getModel().beginUpdate();
-try{if(a)for(var e=d.getModel().isEdge(k),c=e?d.currentEdgeStyle:d.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],f=0;f<e.length;f++){var g=c[e[f]];null!=g&&d.setCellStyles(e[f],g,b)}else for(g=0;g<b.length;g++){for(var k=b[g],l=d.getModel().getStyle(k),m=null!=l?l.split(";"):[],n=z.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var v=p.substring(0,q),t=mxUtils.indexOf(n,v);0<=t&&n.splice(t,1);for(var u=0;u<C.length;u++){var x=C[u];if(0<=mxUtils.indexOf(x,v))for(var B=
-0;B<x.length;B++){var A=mxUtils.indexOf(n,x[B]);0<=A&&n.splice(A,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var v=n[f],D=c[v];null==D||"shape"==v&&!e||(!e||0>mxUtils.indexOf(y,v))&&d.setCellStyles(v,D,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(b,a){E(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){E(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,
+"keys",[],"values",[],"cells",[]))};var B=["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],B,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)y.push(C[a][c]);for(a=0;a<A.length;a++)y.push(A[a]);var E=function(b,a){d.getModel().beginUpdate();
+try{if(a)for(var e=d.getModel().isEdge(k),c=e?d.currentEdgeStyle:d.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],f=0;f<e.length;f++){var g=c[e[f]];null!=g&&d.setCellStyles(e[f],g,b)}else for(g=0;g<b.length;g++){for(var k=b[g],l=d.getModel().getStyle(k),m=null!=l?l.split(";"):[],n=y.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var v=p.substring(0,q),t=mxUtils.indexOf(n,v);0<=t&&n.splice(t,1);for(var u=0;u<C.length;u++){var x=C[u];if(0<=mxUtils.indexOf(x,v))for(var z=
+0;z<x.length;z++){var B=mxUtils.indexOf(n,x[z]);0<=B&&n.splice(B,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var v=n[f],D=c[v];null==D||"shape"==v&&!e||(!e||0>mxUtils.indexOf(A,v))&&d.setCellStyles(v,D,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(b,a){E(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){E(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,
a){var d=[a.getProperty("cell")];a.getProperty("terminalInserted")&&d.push(a.getProperty("terminal"));E(d)});this.addListener("styleChanged",mxUtils.bind(this,function(b,a){var e=a.getProperty("cells"),c=!1,f=!1;if(0<e.length)for(var g=0;g<e.length&&(c=d.getModel().isVertex(e[g])||c,!(f=d.getModel().isEdge(e[g])||f)||!c);g++);else f=c=!0;for(var e=a.getProperty("keys"),k=a.getProperty("values"),g=0;g<e.length;g++){var l=0<=mxUtils.indexOf(B,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=
-mxUtils.indexOf(y,e[g]))f||0<=mxUtils.indexOf(A,e[g])?null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]:c&&0<=mxUtils.indexOf(z,e[g])&&(null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g]);else if(0<=mxUtils.indexOf(z,e[g])){if(c||l)null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g];if(f||l||0<=mxUtils.indexOf(A,e[g]))null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+mxUtils.indexOf(A,e[g]))f||0<=mxUtils.indexOf(z,e[g])?null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]:c&&0<=mxUtils.indexOf(y,e[g])&&(null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g]);else if(0<=mxUtils.indexOf(y,e[g])){if(c||l)null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g];if(f||l||0<=mxUtils.indexOf(z,e[g]))null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]}}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=
@@ -2075,24 +2113,24 @@ EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.g
b.width*a.width,this.scale*b.height*a.height)};a.getPreferredPageSize=function(b,a,d){b=this.getPageLayout();a=this.getPageSize();return new mxRectangle(0,0,b.width*a.width,b.height*a.height)};var c=null;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(b,d){if(null!=a.container){var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),c=a.view.translate,f=a.view.scale,e=mxRectangle.fromRectangle(e);e.x=e.x/f-c.x;e.y=e.y/f-c.y;e.width/=f;e.height/=f;var c=
a.container.scrollTop,g=a.container.scrollLeft,k=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)k+=3;var l=a.container.offsetWidth-k,m=b?Math.max(.3,Math.min(d||1,l/e.width)):f;a.view.scaleAndTranslate(m,Math.max((l-m*e.width)/2,0)/m-e.x,Math.max((a.container.offsetHeight-k-m*e.height)/4,0)/m-e.y);a.container.scrollTop=c*m/f;a.container.scrollLeft=g*m/f}});var f=mxUtils.bind(this,function(){c(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",f)});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)};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%";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 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):
+"#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 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",d);d();var b=0,d=mxUtils.bind(this,function(a,d,e){b++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=e&&c.setAttribute("title",e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);return c}),e=d(mxUtils.bind(this,function(b){this.actions.get("previousPage").funct();
-mxEvent.consume(b)}),Editor.previousLargeImage,mxResources.get("previousPage")||"Previous Page"),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();mxEvent.consume(b)}),Editor.nextLargeImage,mxResources.get("nextPage")||"Next Page"),l=mxUtils.bind(this,function(){null!=
-this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});e.style.paddingLeft="0px";e.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",e.style.display="",g.style.display="inline-block"):(k.style.display="none",e.style.display="none",g.style.display=
-"none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);d(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutLargeImage,(mxResources.get("zoomOut")||"Zoom Out")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInLargeImage,(mxResources.get("zoomIn")||"Zoom In")+" (Alt+Mousewheel)");d(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")||"Fit");var n=null,p=null,q=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),b||200)}),t=mxUtils.bind(this,
-function(b){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var u=d(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 d=u.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=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),v=a.getModel();v.addListener(mxEvent.CHANGE,function(){u.style.display=1<v.getChildCount(v.root)?"":"none"})}null!=
-this.editor.editButtonLink&&d(mxUtils.bind(this,function(b){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("openInNewWindow")||"Open in New Window");a.lightbox&&this.container!=document.body&&d(mxUtils.bind(this,function(b){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeLargeImage,(mxResources.get("close")||
-"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*b+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||t(30),q())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,
-"mouseenter",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?q():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?q():t(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var x=a.getTolerance(),z=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();
-this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(b,a){},mouseUp:function(b,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<x&&Math.abs(this.scrollTop-a.container.scrollTop)<x&&Math.abs(this.startX-d.getGraphX())<x&&Math.abs(this.startY-d.getGraphY())<x&&(0<parseFloat(z.chromelessToolbar.style.opacity||0)?q():t(30))}})}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&
-mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),a=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*a.width;this.translate.y=b.y-(this.y0||0)*a.height}y.apply(this,arguments)};var B=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),d=this.getPagePadding(),e=this.getPageSize(),c=Math.ceil(2*d.x+b.width*e.width),f=Math.ceil(2*d.y+b.height*e.height),g=a.minimumGraphSize;if(null==
+mxEvent.consume(b)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();mxEvent.consume(b)}),Editor.nextLargeImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&
+null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});e.style.paddingLeft="0px";e.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",e.style.display="",g.style.display="inline-block"):(k.style.display="none",e.style.display="none",g.style.display="none");l()});this.editor.addListener("resetGraphView",
+m);this.editor.addListener("pageSelected",l);d(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(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 n=null,p=null,q=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),b||200)}),t=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var u=d(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 d=u.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=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),v=a.getModel();v.addListener(mxEvent.CHANGE,function(){u.style.display=1<v.getChildCount(v.root)?"":"none"})}d(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printLargeImage,mxResources.get("print"));null!=
+this.editor.editButtonLink&&d(mxUtils.bind(this,function(b){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("openInNewWindow"));a.lightbox&&this.container!=document.body&&d(mxUtils.bind(this,function(b){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(b))}),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);this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||t(30),q())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,
+"mouseenter",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?q():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?q():t(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var x=a.getTolerance(),y=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(b,a){},mouseUp:function(b,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<x&&Math.abs(this.scrollTop-a.container.scrollTop)<x&&Math.abs(this.startX-d.getGraphX())<x&&Math.abs(this.startY-d.getGraphY())<x&&(0<parseFloat(y.chromelessToolbar.style.opacity||0)?q():t(30))}})}else if(this.editor.extendCanvas){var A=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&
+mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),a=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*a.width;this.translate.y=b.y-(this.y0||0)*a.height}A.apply(this,arguments)};var B=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),d=this.getPagePadding(),e=this.getPageSize(),c=Math.ceil(2*d.x+b.width*e.width),f=Math.ceil(2*d.y+b.height*e.height),g=a.minimumGraphSize;if(null==
g||g.width!=c||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,c,f);c=d.x-b.x*e.width;d=d.y-b.y*e.height;this.autoTranslate||this.view.translate.x==c&&this.view.translate.y==d?B.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,e=a.view.translate.y,a.view.setTranslate(c,d),a.container.scrollLeft+=Math.round((c-b)*a.view.scale),a.container.scrollTop+=Math.round((d-e)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
-1;var A=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!=A&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-A.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/
-2-A.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,d){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var e=mxEvent.getSource(b);null!=e;){if(e==a.container){A=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(d);mxEvent.consume(b);
+1;var z=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!=z&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-z.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/
+2-z.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,d){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var e=mxEvent.getSource(b);null!=e;){if(e==a.container){z=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(d);mxEvent.consume(b);
break}e=e.parentNode}}))};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(){this.editor.graph.maxFitScale=2;this.editor.graph.fit(60);this.editor.graph.maxFitScale=null};EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.chromeless)return this.onBeforeUnload()})};
@@ -2306,8 +2344,8 @@ Sidebar.prototype.createDropHandler=function(a,c,f,d){f=null!=f?f:!0;return mxUt
(n=b.importCells(a,k,l,g));if(null!=b.layoutManager){var q=b.layoutManager.getLayout(g);if(null!=q){var t=b.view.scale,u=b.view.translate,v=(k+u.x)*t,x=(l+u.y)*t;for(g=0;g<n.length;g++)q.moveCell(n[g],v,x)}}f&&b.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{b.model.endUpdate()}null!=n&&0<n.length&&(b.scrollCellToVisible(n[0]),b.setSelectionCells(n))}}mxEvent.consume(e)}})};
Sidebar.prototype.createDragPreview=function(a,c){var f=document.createElement("div");f.style.border="1px dashed black";f.style.width=a+"px";f.style.height=c+"px";return f};
Sidebar.prototype.dropAndConnect=function(a,c,f,d){var b=this.getDropAndConnectGeometry(a,c[d],f,c),e=[];if(null!=b){var g=this.editorUi.editor.graph;g.model.beginUpdate();try{var k=g.getCellGeometry(a),l=g.getCellGeometry(c[d]),m=g.model.getParent(a),n=!0;if(null!=g.layoutManager){var p=g.layoutManager.getLayout(m);if(null!=p&&p.constructor==mxStackLayout&&(n=!1,e=g.view.getState(m),null!=e)){var q=new mxPoint(e.x/g.view.scale-g.view.translate.x,e.y/g.view.scale-g.view.translate.y);b.x+=q.x;b.y+=
-q.y;var t=b.getTerminalPoint(!1);null!=t&&(t.x+=q.x,t.y+=q.y)}}var u=l.x,v=l.y;g.model.isEdge(c[d])&&(v=u=0);var x=g.model.isEdge(a)||null!=k&&!k.relative&&n,e=c=g.importCells(c,b.x-(x?u:0),b.y-(x?v:0),x?m:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[d],f==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[d])){g.model.setTerminal(c[d],a,!0);var z=g.getCellGeometry(c[d]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(b.getTerminalPoint(!1),!1);else if(x&&g.model.isVertex(m)){var y=
-g.view.getState(m),q=new mxPoint(y.x/g.view.scale-g.view.translate.x,y.y/g.view.scale-g.view.translate.y);g.cellsMoved(c,q.x,q.y,null,null,!0)}}else l=g.getCellGeometry(c[d]),u=b.x-Math.round(l.x),v=b.y-Math.round(l.y),b.x=Math.round(l.x),b.y=Math.round(l.y),g.model.setGeometry(c[d],b),g.cellsMoved(c,u,v,null,null,!0),e=c.slice(),c.push(g.insertEdge(null,null,"",a,c[d],g.createCurrentEdgeStyle()));g.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{g.model.endUpdate()}}return e};
+q.y;var t=b.getTerminalPoint(!1);null!=t&&(t.x+=q.x,t.y+=q.y)}}var u=l.x,v=l.y;g.model.isEdge(c[d])&&(v=u=0);var x=g.model.isEdge(a)||null!=k&&!k.relative&&n,e=c=g.importCells(c,b.x-(x?u:0),b.y-(x?v:0),x?m:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[d],f==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[d])){g.model.setTerminal(c[d],a,!0);var y=g.getCellGeometry(c[d]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(b.getTerminalPoint(!1),!1);else if(x&&g.model.isVertex(m)){var A=
+g.view.getState(m),q=new mxPoint(A.x/g.view.scale-g.view.translate.x,A.y/g.view.scale-g.view.translate.y);g.cellsMoved(c,q.x,q.y,null,null,!0)}}else l=g.getCellGeometry(c[d]),u=b.x-Math.round(l.x),v=b.y-Math.round(l.y),b.x=Math.round(l.x),b.y=Math.round(l.y),g.model.setGeometry(c[d],b),g.cellsMoved(c,u,v,null,null,!0),e=c.slice(),c.push(g.insertEdge(null,null,"",a,c[d],g.createCurrentEdgeStyle()));g.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{g.model.endUpdate()}}return e};
Sidebar.prototype.getDropAndConnectGeometry=function(a,c,f,d){var b=this.editorUi.editor.graph,e=b.view,g=1<d.length,k=b.getCellGeometry(a);d=b.getCellGeometry(c);null!=k&&null!=d&&(d=d.clone(),b.model.isEdge(a)?(a=b.view.getState(a),k=a.absolutePoints,c=k[0],b=k[k.length-1],f==mxConstants.DIRECTION_NORTH?(d.x=c.x/e.scale-e.translate.x-d.width/2,d.y=c.y/e.scale-e.translate.y-d.height/2):(d.x=b.x/e.scale-e.translate.x-d.width/2,d.y=b.y/e.scale-e.translate.y-d.height/2)):(k.relative&&(a=b.view.getState(a),
k=k.clone(),k.x=(a.x-e.translate.x)/e.scale,k.y=(a.y-e.translate.y)/e.scale),e=b.defaultEdgeLength,b.model.isEdge(c)&&null!=d.getTerminalPoint(!0)&&null!=d.getTerminalPoint(!1)?(c=d.getTerminalPoint(!0),b=d.getTerminalPoint(!1),e=b.x-c.x,c=b.y-c.y,e=Math.sqrt(e*e+c*c),d.x=k.getCenterX(),d.y=k.getCenterY(),d.width=1,d.height=1,f==mxConstants.DIRECTION_NORTH?(d.height=e,d.y=k.y-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1)):f==mxConstants.DIRECTION_EAST?(d.width=e,d.x=k.x+k.width,d.setTerminalPoint(new mxPoint(d.x+
d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=k.y+k.height,d.setTerminalPoint(new mxPoint(d.x,d.y+d.height),!1)):f==mxConstants.DIRECTION_WEST&&(d.width=e,d.x=k.x-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1))):(!g&&45<d.width&&45<d.height&&45<k.width&&45<k.height&&(d.width*=k.height/d.height,d.height=k.height),d.x=k.x+k.width/2-d.width/2,d.y=k.y+k.height/2-d.height/2,f==mxConstants.DIRECTION_NORTH?d.y=d.y-k.height/2-d.height/2-e:f==mxConstants.DIRECTION_EAST?d.x=d.x+k.width/2+
@@ -2315,26 +2353,26 @@ d.width/2+e:f==mxConstants.DIRECTION_SOUTH?d.y=d.y+k.height/2+d.height/2+e:f==mx
2):f==mxConstants.DIRECTION_WEST&&(d.x-=k.getCenterX()+k.width/2,d.y-=k.getCenterY()))))));return d};
Sidebar.prototype.createDragSource=function(a,c,f,d,b){function e(b,a){var d;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(d=document.createElement(mxClient.VML_PREFIX+":image"),d.setAttribute("src",b.src),d.style.borderStyle="none"):(d=document.createElement("div"),d.style.backgroundImage="url("+b.src+")",d.style.backgroundPosition="center",d.style.backgroundRepeat="no-repeat"),d.style.width=b.width+4+"px",d.style.height=b.height+4+"px",d.style.display=mxClient.IS_QUIRKS?
"inline":"inline-block"):(d=mxUtils.createImage(b.src),d.style.width=b.width+"px",d.style.height=b.height+"px");null!=a&&d.setAttribute("title",a);mxUtils.setOpacity(d,b==this.refreshTarget?30:20);d.style.position="absolute";d.style.cursor="crosshair";return d}function g(b,a,d,e){null!=e.parentNode&&(mxUtils.contains(d,b,a)?(mxUtils.setOpacity(e,100),I=e):mxUtils.setOpacity(e,e==F?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,m=null,n=null,p=this,q=0;q<d.length&&(null==n&&this.editorUi.editor.graph.model.isVertex(d[q])?
-n=q:null==m&&this.editorUi.editor.graph.model.isEdge(d[q])&&null==this.editorUi.editor.graph.model.getTerminal(d[q],!0)&&(m=q),null==n||null==m);q++);var t=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(b,a,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=z&&I==F){var k=b.isCellSelected(z.cell)?b.getSelectionCells():[z.cell],k=this.updateShapes(b.model.isEdge(z.cell)?d[0]:d[n],k);b.setSelectionCells(k)}else null!=d&&null!=I&&null!=
+n=q:null==m&&this.editorUi.editor.graph.model.isEdge(d[q])&&null==this.editorUi.editor.graph.model.getTerminal(d[q],!0)&&(m=q),null==n||null==m);q++);var t=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(b,a,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=y&&I==F){var k=b.isCellSelected(y.cell)?b.getSelectionCells():[y.cell],k=this.updateShapes(b.model.isEdge(y.cell)?d[0]:d[n],k);b.setSelectionCells(k)}else null!=d&&null!=I&&null!=
v&&I!=F?(k=b.model.isEdge(v.cell)||null==m?n:m,b.setSelectionCells(this.dropAndConnect(v.cell,d,J,k))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}),f,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(b,a){t.isActive()&&t.reset()});var u=t.mouseDown;t.mouseDown=function(b){mxEvent.isPopupTrigger(b)||mxEvent.isMultiTouchEvent(b)||(l.stopEditing(),u.apply(this,
-arguments))};var v=null,x=null,z=null,y=!1,B=e(this.triangleUp,mxResources.get("connect")),A=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),E=e(this.triangleLeft,mxResources.get("connect")),F=e(this.refreshTarget,mxResources.get("replace")),D=null,K=e(this.roundDrop),H=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,I=null,L=t.createPreviewElement;t.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&(a.style.pointerEvents=
+arguments))};var v=null,x=null,y=null,A=!1,B=e(this.triangleUp,mxResources.get("connect")),z=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),E=e(this.triangleLeft,mxResources.get("connect")),F=e(this.refreshTarget,mxResources.get("replace")),D=null,K=e(this.roundDrop),H=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,I=null,L=t.createPreviewElement;t.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&(a.style.pointerEvents=
"none");this.previewElementWidth=a.style.width;this.previewElementHeight=a.style.height;return a};var M=t.dragEnter;t.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");M.apply(this,arguments)};var Q=t.dragExit;t.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");Q.apply(this,arguments)};t.dragOver=function(a,e){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=I&&this.currentGuide.hide();if(null!=this.previewElement){var c=
-a.view;if(null!=z&&I==F)this.previewElement.style.display=a.model.isEdge(z.cell)?"none":"",this.previewElement.style.left=z.x+"px",this.previewElement.style.top=z.y+"px",this.previewElement.style.width=z.width+"px",this.previewElement.style.height=z.height+"px";else if(null!=v&&null!=I){var f=a.model.isEdge(v.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(v.cell,d[f],J,d),k=a.model.isEdge(v.cell)?null:a.getCellGeometry(v.cell),l=a.getCellGeometry(d[f]),q=a.model.getParent(v.cell),u=c.translate.x*
+a.view;if(null!=y&&I==F)this.previewElement.style.display=a.model.isEdge(y.cell)?"none":"",this.previewElement.style.left=y.x+"px",this.previewElement.style.top=y.y+"px",this.previewElement.style.width=y.width+"px",this.previewElement.style.height=y.height+"px";else if(null!=v&&null!=I){var f=a.model.isEdge(v.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(v.cell,d[f],J,d),k=a.model.isEdge(v.cell)?null:a.getCellGeometry(v.cell),l=a.getCellGeometry(d[f]),q=a.model.getParent(v.cell),u=c.translate.x*
c.scale,x=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(q)&&(x=c.getState(q),u=x.x,x=x.y);k=l.x;l=l.y;a.model.isEdge(d[f])&&(l=k=0);this.previewElement.style.left=(g.x-k)*c.scale+u+"px";this.previewElement.style.top=(g.y-l)*c.scale+x+"px";1==d.length&&(this.previewElement.style.width=g.width*c.scale+"px",this.previewElement.style.height=g.height*c.scale+"px");this.previewElement.style.display=""}else null!=t.currentHighlight.state&&a.model.isEdge(t.currentHighlight.state.cell)?(this.previewElement.style.left=
-Math.round(parseInt(this.previewElement.style.left)-b.width*c.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-b.height*c.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var W=(new Date).getTime(),O=0,G=null,X=this.editorUi.editor.graph.getCellStyle(d[0]);t.getDropTarget=mxUtils.bind(this,function(b,a,e,c){var f=mxEvent.isAltDown(c)||
-null==d?null:b.getCellAt(a,e);if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}b.isCellLocked(f)&&(f=null);var l=b.view.getState(f),k=I=null;G!=l?(G=l,W=(new Date).getTime(),O=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(G=l,t.getDropTarget(b,a,e,c))},this.dropTargetDelay+10))):O=(new Date).getTime()-
-W;if(2500>O&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(X,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(X,mxConstants.STYLE_SHAPE)||1500<O||b.model.isEdge(l.cell))&&O>this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=n||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){z=l;var m=b.model.isEdge(l.cell)?b.view.getPoint(l):new mxPoint(l.getCenterX(),
-l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);F.style.left=Math.floor(m.x)+"px";F.style.top=Math.floor(m.y)+"px";null==D&&(b.container.appendChild(F),D=F.parentNode);g(a,e,m,F)}else null==z||!mxUtils.contains(z,a,e)||1500<O&&!mxEvent.isShiftDown(c)?(z=null,null!=D&&(F.parentNode.removeChild(F),D=null)):null!=z&&null!=D&&(m=b.model.isEdge(z.cell)?b.view.getPoint(z):new mxPoint(z.getCenterX(),z.getCenterY()),
-m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,m,F));if(y&&null!=v&&!mxEvent.isAltDown(c)&&null==I){k=mxRectangle.fromRectangle(v);if(b.model.isEdge(v.cell)){var p=v.absolutePoints;null!=K.parentNode&&(m=p[0],k.add(g(a,e,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=H.parentNode&&(p=p[p.length-1],k.add(g(a,e,new mxRectangle(p.x-
+Math.round(parseInt(this.previewElement.style.left)-b.width*c.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-b.height*c.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var X=(new Date).getTime(),N=0,G=null,W=this.editorUi.editor.graph.getCellStyle(d[0]);t.getDropTarget=mxUtils.bind(this,function(b,a,e,c){var f=mxEvent.isAltDown(c)||
+null==d?null:b.getCellAt(a,e);if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}b.isCellLocked(f)&&(f=null);var l=b.view.getState(f),k=I=null;G!=l?(G=l,X=(new Date).getTime(),N=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(G=l,t.getDropTarget(b,a,e,c))},this.dropTargetDelay+10))):N=(new Date).getTime()-
+X;if(2500>N&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<N||b.model.isEdge(l.cell))&&N>this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=n||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){y=l;var m=b.model.isEdge(l.cell)?b.view.getPoint(l):new mxPoint(l.getCenterX(),
+l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);F.style.left=Math.floor(m.x)+"px";F.style.top=Math.floor(m.y)+"px";null==D&&(b.container.appendChild(F),D=F.parentNode);g(a,e,m,F)}else null==y||!mxUtils.contains(y,a,e)||1500<N&&!mxEvent.isShiftDown(c)?(y=null,null!=D&&(F.parentNode.removeChild(F),D=null)):null!=y&&null!=D&&(m=b.model.isEdge(y.cell)?b.view.getPoint(y):new mxPoint(y.getCenterX(),y.getCenterY()),
+m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,m,F));if(A&&null!=v&&!mxEvent.isAltDown(c)&&null==I){k=mxRectangle.fromRectangle(v);if(b.model.isEdge(v.cell)){var p=v.absolutePoints;null!=K.parentNode&&(m=p[0],k.add(g(a,e,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=H.parentNode&&(p=p[p.length-1],k.add(g(a,e,new mxRectangle(p.x-
this.roundDrop.width/2,p.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),H)))}else m=mxRectangle.fromRectangle(v),null!=v.shape&&null!=v.shape.boundingBox&&(m=mxRectangle.fromRectangle(v.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(v.cell),null!=p&&(m.x-=p.horizontalOffset/2,m.y-=p.verticalOffset/2,m.width+=p.horizontalOffset,m.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&
-"hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox&&m.add(p.rotationShape.boundingBox)),k.add(g(a,e,new mxRectangle(v.getCenterX()-this.triangleUp.width/2,m.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),B)),k.add(g(a,e,new mxRectangle(m.x+m.width,v.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),A)),k.add(g(a,e,new mxRectangle(v.getCenterX()-this.triangleDown.width/
-2,m.y+m.height,this.triangleDown.width,this.triangleDown.height),C)),k.add(g(a,e,new mxRectangle(m.x-this.triangleLeft.width,v.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),E));null!=k&&k.grow(10)}J=mxConstants.DIRECTION_NORTH;I==A?J=mxConstants.DIRECTION_EAST:I==C||I==H?J=mxConstants.DIRECTION_SOUTH:I==E&&(J=mxConstants.DIRECTION_WEST);null!=z&&I==F&&(l=z);m=(null==n||b.isCellConnectable(d[n]))&&(b.model.isEdge(f)&&null!=n||b.model.isVertex(f)&&b.isCellConnectable(f));
-if(null!=v&&5E3<=O||v!=l&&(null==k||!mxUtils.contains(k,a,e)||500<O&&null==I&&m))if(y=!1,v=5E3>O&&O>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=v&&m){k=[K,H,B,A,C,E];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);b.model.isEdge(f)?(p=l.absolutePoints,null!=p&&(m=p[0],p=p[p.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),K.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(p.x-
+"hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox&&m.add(p.rotationShape.boundingBox)),k.add(g(a,e,new mxRectangle(v.getCenterX()-this.triangleUp.width/2,m.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),B)),k.add(g(a,e,new mxRectangle(m.x+m.width,v.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),z)),k.add(g(a,e,new mxRectangle(v.getCenterX()-this.triangleDown.width/
+2,m.y+m.height,this.triangleDown.width,this.triangleDown.height),C)),k.add(g(a,e,new mxRectangle(m.x-this.triangleLeft.width,v.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),E));null!=k&&k.grow(10)}J=mxConstants.DIRECTION_NORTH;I==z?J=mxConstants.DIRECTION_EAST:I==C||I==H?J=mxConstants.DIRECTION_SOUTH:I==E&&(J=mxConstants.DIRECTION_WEST);null!=y&&I==F&&(l=y);m=(null==n||b.isCellConnectable(d[n]))&&(b.model.isEdge(f)&&null!=n||b.model.isVertex(f)&&b.isCellConnectable(f));
+if(null!=v&&5E3<=N||v!=l&&(null==k||!mxUtils.contains(k,a,e)||500<N&&null==I&&m))if(A=!1,v=5E3>N&&N>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=v&&m){k=[K,H,B,z,C,E];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);b.model.isEdge(f)?(p=l.absolutePoints,null!=p&&(m=p[0],p=p[p.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),K.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(p.x-
this.roundDrop.width/2)+"px",H.style.top=Math.floor(p.y-this.roundDrop.height/2)+"px",null==b.model.getTerminal(f,!0)&&b.container.appendChild(K),null==b.model.getTerminal(f,!1)&&b.container.appendChild(H))):(m=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(m=mxRectangle.fromRectangle(l.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(l.cell),null!=p&&(m.x-=p.horizontalOffset/2,m.y-=p.verticalOffset/
-2,m.width+=p.horizontalOffset,m.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&"hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox&&m.add(p.rotationShape.boundingBox)),B.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",B.style.top=Math.floor(m.y-this.triangleUp.height)+"px",A.style.left=Math.floor(m.x+m.width)+"px",A.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
-2)+"px",C.style.left=B.style.left,C.style.top=Math.floor(m.y+m.height)+"px",E.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",E.style.top=A.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(B),b.container.appendChild(C)),b.container.appendChild(A),b.container.appendChild(E));null!=l&&(x=b.selectionCellsHandler.getHandler(l.cell),null!=x&&null!=x.setHandlesVisible&&x.setHandlesVisible(!1));y=!0}else for(k=[K,H,B,A,C,E],m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);
-y||null==x||x.setHandlesVisible(!0);f=mxEvent.isAltDown(c)&&!mxEvent.isShiftDown(c)||null!=z&&I==F?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);k=b.getModel();if(null!=f&&(null!=I||!b.isSplitTarget(f,d,c))){for(;null!=f&&!b.isValidDropTarget(f,d,c)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(b.view.currentRoot==f||!b.isValidRoot(f)&&0==b.getModel().getChildCount(f)||b.isCellLocked(f)||k.isEdge(f))f=null}return f});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var b=[K,H,F,B,A,C,E],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=v&&null!=x&&x.reset();I=D=z=v=x=null};return t};
+2,m.width+=p.horizontalOffset,m.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&"hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox&&m.add(p.rotationShape.boundingBox)),B.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",B.style.top=Math.floor(m.y-this.triangleUp.height)+"px",z.style.left=Math.floor(m.x+m.width)+"px",z.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
+2)+"px",C.style.left=B.style.left,C.style.top=Math.floor(m.y+m.height)+"px",E.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",E.style.top=z.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(B),b.container.appendChild(C)),b.container.appendChild(z),b.container.appendChild(E));null!=l&&(x=b.selectionCellsHandler.getHandler(l.cell),null!=x&&null!=x.setHandlesVisible&&x.setHandlesVisible(!1));A=!0}else for(k=[K,H,B,z,C,E],m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);
+A||null==x||x.setHandlesVisible(!0);f=mxEvent.isAltDown(c)&&!mxEvent.isShiftDown(c)||null!=y&&I==F?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);k=b.getModel();if(null!=f&&(null!=I||!b.isSplitTarget(f,d,c))){for(;null!=f&&!b.isValidDropTarget(f,d,c)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(b.view.currentRoot==f||!b.isValidRoot(f)&&0==b.getModel().getChildCount(f)||b.isCellLocked(f)||k.isEdge(f))f=null}return f});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
+arguments);for(var b=[K,H,F,B,z,C,E],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=v&&null!=x&&x.reset();I=D=y=v=x=null};return t};
Sidebar.prototype.itemClicked=function(a,c,f,d){d=this.editorUi.editor.graph;if(mxEvent.isAltDown(f)){if(1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){c=null;for(var b=0;b<a.length&&null==c;b++)d.model.isVertex(a[b])&&(c=b);null!=c&&(d.setSelectionCells(this.dropAndConnect(d.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
c)),d.scrollCellToVisible(d.getSelectionCell()))}}else mxEvent.isShiftDown(f)?d.isSelectionEmpty()||(this.updateShapes(a[0],d.getSelectionCells()),d.scrollCellToVisible(d.getSelectionCell())):(a=d.getFreeInsertPoint(),c.drop(d,f,null,a.x,a.y),null!=this.editorUi.hoverIcons&&mxEvent.isTouchEvent(f)&&this.editorUi.hoverIcons.update(d.view.getState(d.getSelectionCell())))};
Sidebar.prototype.addClickHandler=function(a,c,f){var d=this.editorUi.editor.graph,b=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(b){e=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))});c.mouseUp=mxUtils.bind(this,function(g){if(!mxEvent.isPopupTrigger(g)&&null==this.currentGraph&&null!=e){var k=d.tolerance;Math.abs(e.x-mxEvent.getClientX(g))<=k&&Math.abs(e.y-mxEvent.getClientY(g))<=k&&this.itemClicked(f,c,g,a)}b.apply(c,arguments);e=null;this.currentElt=a})};
@@ -2368,9 +2406,9 @@ function(){var b=n.apply(this,arguments);if(this.graph.pageVisible){for(var a=[]
function(b,a){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(b){for(var a=mxGraphHandler.prototype.getCells.apply(this,arguments),d=[],e=0;e<a.length;e++){var c=this.graph.view.getState(a[e]),c=null!=c?c.style:this.graph.getCellStyle(a[e]);
"1"==mxUtils.getValue(c,"part","0")?(c=this.graph.model.getParent(a[e]),this.graph.model.isVertex(c)&&0>mxUtils.indexOf(a,c)&&d.push(c)):d.push(a[e])}return d};this.connectionHandler.createTargetVertex=function(b,a){var d=this.graph.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(a),this.graph.model.isVertex(d)&&(a=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
this.getRubberband=function(){return p};var q=(new Date).getTime(),t=0,u=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;u.apply(this,arguments);b!=this.currentState?(q=(new Date).getTime(),t=0):t=(new Date).getTime()-q};var v=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<t||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&v.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(b){return x.apply(this,arguments)||mxEvent.isShiftDown(b)};var z=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(b){return z.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(y=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=y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var B=this.click;this.click=function(b){if(this.isEnabled()||b.isConsumed())return B.apply(this,arguments);var a=b.getCell();null!=a&&(a=this.getLinkForCell(a),null!=a&&window.open(a))};
-var A=this.getCursorForCell;this.getCursorForCell=function(b){if(this.isEnabled())return A.apply(this,arguments);if(null!=this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=this.getAllCells(b.x,b.y,b.width,b.height);this.selectCellsForEvent(d,a);return d};this.getAllCells=function(b,a,d,e,c,f){f=null!=f?f:[];if(0<d||0<e){var g=this.getModel(),k=b+d,l=a+e;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var m=g.getChildCount(c),n=0;n<m;n++){var p=
+"outlineConnect","1"))&&v.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(b){return x.apply(this,arguments)||mxEvent.isShiftDown(b)};var y=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(b){return y.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var A=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(A=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=A)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var B=this.click;this.click=function(b){if(this.isEnabled()||b.isConsumed())return B.apply(this,arguments);var a=b.getCell();null!=a&&(a=this.getLinkForCell(a),null!=a&&window.open(a))};
+var z=this.getCursorForCell;this.getCursorForCell=function(b){if(this.isEnabled())return z.apply(this,arguments);if(null!=this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=this.getAllCells(b.x,b.y,b.width,b.height);this.selectCellsForEvent(d,a);return d};this.getAllCells=function(b,a,d,e,c,f){f=null!=f?f:[];if(0<d||0<e){var g=this.getModel(),k=b+d,l=a+e;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var m=g.getChildCount(c),n=0;n<m;n++){var p=
g.getChildAt(c,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var v=mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(q=mxUtils.getBoundingBox(q,v));(g.isEdge(p)||g.isVertex(p))&&q.x>=b&&q.y+q.height<=l&&q.y>=a&&q.x+q.width<=k&&f.push(p);this.getAllCells(b,a,d,e,p,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?
!1:C.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();E=null==d||this.isSelectionEmpty()||this.isCellSelected(d.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),e=a.getProperty("cell");null==e?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);E=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=
@@ -2478,9 +2516,9 @@ null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoad
b.shape)if(null!=b.shape.stencil){if(null!=b.shape.stencil)return b.shape.stencil.constraints}else if(null!=b.shape.constraints)return b.shape.constraints}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var a=this.view.getState(b),a=null!=a?a.style:this.getCellStyle(b);null!=a&&(a=mxUtils.getValue(a,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,a,[b]))}};
Graph.prototype.isValidRoot=function(b){for(var a=this.model.getChildCount(b),d=0,c=0;c<a;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||d++)}return 0<d||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b){var a=this.view.getState(b),a=null!=a?a.style:this.getCellStyle(b);return"1"!=mxUtils.getValue(a,"part","0")&&(this.isContainer(b)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(a,"dropTarget",
"1"))};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var a=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(a&&null!=b&&null!=this.layoutManager){var d=this.model.getParent(b);null!=d&&(d=this.layoutManager.getLayout(d),null!=d&&d.constructor==mxStackLayout&&(a=!1))}return a};Graph.prototype.getPreferredSizeForCell=function(b){var a=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=a&&(a.width+=10,a.height+=4,this.gridEnabled&&(a.width=this.snap(a.width),a.height=this.snap(a.height)));return a};Graph.prototype.turnShapes=function(b){var a=this.getModel(),d=[];a.beginUpdate();try{for(var c=0;c<b.length;c++){var e=b[c];if(a.isEdge(e)){var f=a.getTerminal(e,!0),g=a.getTerminal(e,!1);a.setTerminal(e,g,!0);a.setTerminal(e,f,!1);var k=a.getGeometry(e);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),m=k.getTerminalPoint(!1);
-k.setTerminalPoint(l,!1);k.setTerminalPoint(m,!0);a.setGeometry(e,k);var n=this.view.getState(e),p=this.view.getState(f),q=this.view.getState(g);if(null!=n){var v=null!=p?this.getConnectionConstraint(n,p,!0):null,t=null!=q?this.getConnectionConstraint(n,q,!1):null;this.setConnectionConstraint(e,f,!0,t);this.setConnectionConstraint(e,g,!1,v)}d.push(e)}}else if(a.isVertex(e)&&(k=this.getCellGeometry(e),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var u=k.width;k.width=k.height;
-k.height=u;a.setGeometry(e,k);var x=this.view.getState(e);if(null!=x){var z=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==z?z="south":"south"==z?z="west":"west"==z?z="north":"north"==z&&(z="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,z,[e])}d.push(e)}}}finally{a.endUpdate()}return d};Graph.prototype.processChange=function(b){mxGraph.prototype.processChange.apply(this,arguments);if(b instanceof mxValueChange&&null!=b.cell.value&&"object"==typeof b.cell.value){var a=this.model.getDescendants(b.cell);
+arguments);null!=a&&(a.width+=10,a.height+=4,this.gridEnabled&&(a.width=this.snap(a.width),a.height=this.snap(a.height)));return a};Graph.prototype.turnShapes=function(b){var a=this.getModel(),d=[];a.beginUpdate();try{for(var c=0;c<b.length;c++){var e=b[c];if(a.isEdge(e)){var f=a.getTerminal(e,!0),k=a.getTerminal(e,!1);a.setTerminal(e,k,!0);a.setTerminal(e,f,!1);var g=a.getGeometry(e);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var l=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);
+g.setTerminalPoint(l,!1);g.setTerminalPoint(m,!0);a.setGeometry(e,g);var n=this.view.getState(e),p=this.view.getState(f),q=this.view.getState(k);if(null!=n){var v=null!=p?this.getConnectionConstraint(n,p,!0):null,t=null!=q?this.getConnectionConstraint(n,q,!1):null;this.setConnectionConstraint(e,f,!0,t);this.setConnectionConstraint(e,k,!1,v)}d.push(e)}}else if(a.isVertex(e)&&(g=this.getCellGeometry(e),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var u=g.width;g.width=g.height;
+g.height=u;a.setGeometry(e,g);var x=this.view.getState(e);if(null!=x){var y=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==y?y="south":"south"==y?y="west":"west"==y?y="north":"north"==y&&(y="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,y,[e])}d.push(e)}}}finally{a.endUpdate()}return d};Graph.prototype.processChange=function(b){mxGraph.prototype.processChange.apply(this,arguments);if(b instanceof mxValueChange&&null!=b.cell.value&&"object"==typeof b.cell.value){var a=this.model.getDescendants(b.cell);
if(0<a.length)for(var d=0;d<a.length;d++)this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};Graph.prototype.cellLabelChanged=function(b,a,d){a=this.zapGremlins(a);this.model.beginUpdate();try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var e=b.getAttribute("placeholder"),c=b;null!=c;){if(c==this.model.getRoot()||null!=c.value&&"object"==typeof c.value&&c.hasAttribute(e)){this.setAttributeForCell(c,e,a);break}c=
this.model.getParent(c)}var f=b.value.cloneNode(!0);f.setAttribute("label",a);a=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(b){for(var a=[],d=0;d<b.length;d++)if(this.isCellDeletable(b[d])){var c=this.view.getState(b[d]);if(null!=c){var e=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&
c==mxConstants.NONE&&a.push(b[d])}}b=a;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,a){this.setAttributeForCell(b,"link",a)};Graph.prototype.setTooltipForCell=function(b,a){this.setAttributeForCell(b,"tooltip",a)};Graph.prototype.setAttributeForCell=function(b,a,d){var c;null!=b.value&&"object"==typeof b.value?c=b.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=d&&
@@ -2514,7 +2552,7 @@ d.innerHTML=b;b=document.createDocumentFragment();for(var c;c=d.firstChild;)last
if(mxEvent.isTouchEvent(a.getEvent())&&null==a.getState()){var d=this.getCellAt(a.graphX,a.graphY);null!=d&&this.isSwimlane(d)&&this.hitsSwimlaneContent(d,a.graphX,a.graphY)||(a.state=this.view.getState(d),null!=a.state&&null!=a.state.shape&&(this.container.style.cursor=a.state.shape.node.style.cursor))}null==a.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return a};var a=!1,d=!1,c=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(b,f,g){b==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),
a=this.isCellSelected(f.getCell()),d=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(b,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(e.getEvent())&&(d&&null==e.getCell()&&this.isSelectionEmpty()||a&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
arguments)})};mxCellEditor.prototype.isContentEditing=function(){var b=this.graph.view.getState(this.editingCell);return null!=b&&1==b.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var b=[],a=0,d=sel.rangeCount;a<d;++a)b.push(sel.getRangeAt(a));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=
-function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var a=0,d=b.length;a<d;++a)sel.addRange(b[a])}else document.selection&&b.select&&b.select()}catch(da){}};var b=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));b.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,
+function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var a=0,d=b.length;a<d;++a)sel.addRange(b[a])}else document.selection&&b.select&&b.select()}catch(ca){}};var b=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));b.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,
a){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,a){g.apply(this,arguments);var d=this.graph.view.getState(b);this.textarea.className=null!=d&&1==d.style.html?"mxCellEditor geContentEditable":
"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var d=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);this.graph.getModel().isEdge(d)&&null!=c&&c.relative||this.graph.getModel().isEdge(b)?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 k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function a(b,d){d.originalNode=b;b=b.firstChild;for(var c=d.firstChild;null!=b&&null!=c;)a(b,c),b=b.nextSibling,c=c.nextSibling;return d}function d(b,a){if(null!=b)if(a.originalNode!=b)c(b);else for(b=b.firstChild,a=a.firstChild;null!=b;){var e=b.nextSibling;null==a?c(b):(d(b,a),a=a.nextSibling);b=e}}function c(b){for(var a=b.firstChild;null!=a;){var d=a.nextSibling;
@@ -2529,7 +2567,7 @@ mxCellEditor.prototype.resize=function(b,a){if(null!=this.textarea)if(b=this.gra
mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.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=
"",l.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,a){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var d=this.graph.getEditingValue(b.cell,a);"1"==mxUtils.getValue(b.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>"));return this.graph.sanitizeHtml(d,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
-function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var a=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return"1"==mxUtils.getValue(b.style,"nl2Br","1")?a.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):a.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(X){}};
+function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var a=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return"1"==mxUtils.getValue(b.style,"nl2Br","1")?a.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):a.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}};
var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,a){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(b.cell)){var d=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(a||"")&&d==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([b.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
function(b){var a=null;if(this.graph.getModel().isEdge(b.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(b.cell)))a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),a==mxConstants.NONE&&(a=null);return a};mxCellEditor.prototype.getMinimumSize=function(b){var a=this.graph.getView().scale;return new mxRectangle(0,0,null==b.text?30:b.text.size*a+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(b,a,d,c,e,f){mxEvent.isAltDown(f)&&
(e=null);p.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 d=this.graph.view.translate,c=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/c-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/c-d.y);this.hint.innerHTML=b+", "+d;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
@@ -2556,11 +2594,11 @@ e,this.graph.getDefaultParent(),!0,!0),d=0;d<k.length;d++)if(this.graph.isCellMo
c=mxUtils.getOffset(this.graph.container);d.x-=c.x;d.y-=c.y;var c=a.getX()+d.x,d=a.getY()+d.y,e=this.first.x-c,f=this.first.y-d,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(c,d),this.isSpaceEvent(a)?(c=this.x+this.width,d=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(a.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=c-this.width),this.y<this.first.y&&(this.y=d-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)),a.consume()}};var u=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);u.apply(this,arguments)};var v=(new Date).getTime(),x=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,a,d,c){z.apply(this,arguments);d!=this.currentTerminalState?(v=(new Date).getTime(),
-x=0):x=(new Date).getTime()-v;this.currentTerminalState=d};var y=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&y.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.createHandleShape=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),a.consume()}};var u=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);u.apply(this,arguments)};var v=(new Date).getTime(),x=0,y=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,a,d,c){y.apply(this,arguments);d!=this.currentTerminalState?(v=(new Date).getTime(),
+x=0):x=(new Date).getTime()-v;this.currentTerminalState=d};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.createHandleShape=
function(b,a){var d=null!=b&&0==b,c=this.state.getVisibleTerminalState(d),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,d):null,d=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0,0,d.width,d.height),d.src),d.preserveImageAspect=
-!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&--d;return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var A=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=c&&c.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return A.apply(this,arguments)};var C=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=this.graph.getModel(),d=a.getParent(b.cell),
+!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&--d;return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var z=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
+function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=c&&c.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return z.apply(this,arguments)};var C=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=this.graph.getModel(),d=a.getParent(b.cell),
c=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):C.apply(this,arguments)};var E=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),c=d.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(c)||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 F=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){F.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
@@ -2575,13 +2613,13 @@ function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind
"0",b),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==b&&(b=this.state);this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b.y+b.height+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 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 b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b.y+
-b.height+6+this.state.view.graph.tolerance)+"px"}};var W=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var O=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),
+b.height+6+this.state.view.graph.tolerance)+"px"}};var X=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){X.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var N=mxEdgeHandler.prototype.destroy;mxEdgeHandler.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)}}();
(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxCylinder.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 t(){mxActor.call(this)}function u(b,a){this.canvas=
b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=a;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function z(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function C(){mxShape.call(this)}function E(){mxShape.call(this)}function F(){mxEllipse.call(this)}function D(){mxShape.call(this)}
-function K(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function M(){mxCylinder.call(this)}function Q(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function O(){mxArrowConnector.call(this);this.spacing=0}function G(){mxArrowConnector.call(this);this.spacing=0}function X(){mxActor.call(this)}function N(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}
-function Y(){mxActor.call(this)}function R(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function V(){mxActor.call(this)}function ea(){mxActor.call(this)}function ba(){mxActor.call(this)}function T(){mxActor.call(this)}function aa(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}function Z(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function y(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function E(){mxShape.call(this)}function F(){mxEllipse.call(this)}function D(){mxShape.call(this)}
+function K(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function M(){mxCylinder.call(this)}function Q(){mxDoubleEllipse.call(this)}function X(){mxDoubleEllipse.call(this)}function N(){mxArrowConnector.call(this);this.spacing=0}function G(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}
+function Y(){mxActor.call(this)}function S(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function V(){mxActor.call(this)}function da(){mxActor.call(this)}function Z(){mxActor.call(this)}function T(){mxActor.call(this)}function ba(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}function aa(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}
function ja(){mxEllipse.call(this)}function la(){mxActor.call(this)}function ia(){mxActor.call(this)}function pa(){mxActor.call(this)}function ya(b,a,d,c,e,f,g,k,l,m){g+=l;var n=c.clone();c.x-=e*(2*g+l);c.y-=f*(2*g+l);e*=g+l;f*=g+l;return function(){b.ellipse(n.x-e-g,n.y-f-g,2*g,2*g);m?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(b,a,d,c,e,f){a=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));
f?(b.moveTo(a,e),b.lineTo(a,a),b.lineTo(0,0),b.moveTo(a,a),b.lineTo(c,a)):(b.moveTo(0,0),b.lineTo(c-a,0),b.lineTo(c,a),b.lineTo(c,e),b.lineTo(a,e),b.lineTo(0,e-a),b.lineTo(0,0),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var va=Math.tan(mxUtils.toRadians(30)),na=(.5-va)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c,e/va);b.translate((c-a)/2,(e-a)/2+a/4);b.moveTo(0,.25*a);b.lineTo(.5*a,a*na);b.lineTo(a,.25*a);b.lineTo(.5*
a,(.5-na)*a);b.lineTo(0,.25*a);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=c;mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(b,a,d,c,e,f){a=Math.min(c,e/(.5+va));f?(b.moveTo(0,.25*a),b.lineTo(.5*a,(.5-na)*a),b.lineTo(a,.25*a),b.moveTo(.5*a,(.5-na)*a),b.lineTo(.5*a,(1-na)*a)):(b.translate((c-a)/2,(e-a)/2),b.moveTo(0,.25*a),b.lineTo(.5*a,a*na),b.lineTo(a,.25*a),b.lineTo(a,.75*a),b.lineTo(.5*a,(1-na)*a),b.lineTo(0,.75*a),b.close());b.end()};
@@ -2605,13 +2643,13 @@ mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEven
b.close(),b.end(),b.fillAndStroke()}};var Fa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(b,a,d,c,e){null==b.handJiggle&&Fa.apply(this,arguments)};mxUtils.extend(v,mxRectangleShape);v.prototype.size=.1;v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var a=
b.width,d=b.height;b=new mxRectangle(b.x,b.y,a,d);var c=a*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,c=Math.max(c,Math.min(a*e,d*e));b.x+=c;b.width-=2*c}return b};v.prototype.paintForeground=function(b,a,d,c,e){var f=c*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(c*g,e*g));b.begin();b.moveTo(a+f,d);b.lineTo(a+f,d+e);b.moveTo(a+c-f,d);b.lineTo(a+c-f,d+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=v;mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.redrawPath=function(b,a,d,c,e){a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(0,e),new mxPoint(a,e/2)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.redrawPath=function(b,a,d,c,e){a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(b,[new mxPoint(a,0),new mxPoint(c-a,0),new mxPoint(c,.5*e),new mxPoint(c-a,e),new mxPoint(a,e),new mxPoint(0,.5*e)],this.isRounded,d,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=z;mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.paintForeground=function(b,a,d,c,e){var f=Math.min(c/5,e/5)+1;b.begin();b.moveTo(a+c/2,d+f);b.lineTo(a+c/2,d+e-f);b.moveTo(a+f,d+e/2);b.lineTo(a+c-f,d+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.prototype.defaultShapes.plus=y;var za=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var a=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+a,b.y+a,b.width-2*a,b.height-2*a)}return b};mxRhombus.prototype.paintVertexShape=function(b,a,d,c,e){za.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(0,e),new mxPoint(a,e/2)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.redrawPath=function(b,a,d,c,e){a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(b,[new mxPoint(a,0),new mxPoint(c-a,0),new mxPoint(c,.5*e),new mxPoint(c-a,e),new mxPoint(a,e),new mxPoint(0,.5*e)],this.isRounded,d,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=y;mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(b,a,d,c,e){var f=Math.min(c/5,e/5)+1;b.begin();b.moveTo(a+c/2,d+f);b.lineTo(a+c/2,d+e-f);b.moveTo(a+f,d+e/2);b.lineTo(a+c-f,d+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.prototype.defaultShapes.plus=A;var za=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var a=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+a,b.y+a,b.width-2*a,b.height-2*a)}return b};mxRhombus.prototype.paintVertexShape=function(b,a,d,c,e){za.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);a+=f;d+=f;c-=2*f;e-=2*f;0<c&&0<e&&(b.setShadow(!1),za.apply(this,[b,a,d,c,e]))}};mxUtils.extend(B,mxRectangleShape);B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var a=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+a,b.y+a,b.width-2*a,b.height-2*a)}return b};B.prototype.paintForeground=function(b,a,d,
c,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);a+=f;d+=f;c-=2*f;e-=2*f;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var k=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+f+"Height"],
p=this.style["symbol"+f+"Spacing"]||0,q=this.style["symbol"+f+"ArcSpacing"];null!=q&&(p+=this.getArcSize(c+this.strokewidth,e+this.strokewidth)*q);var q=a,v=d,q=k==mxConstants.ALIGN_CENTER?q+(c-m)/2:k==mxConstants.ALIGN_RIGHT?q+(c-m-p):q+p,v=l==mxConstants.ALIGN_MIDDLE?v+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?v+(e-n-p):v+p;b.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,b,q,v,m,n);b.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.prototype.defaultShapes.ext=B;mxUtils.extend(A,mxCylinder);A.prototype.redrawPath=function(b,a,d,c,e,f){f?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.prototype.defaultShapes.message=A;mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(b,a,d,c,e){b.translate(a,d);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,
+mxCellRenderer.prototype.defaultShapes.ext=B;mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(b,a,d,c,e,f){f?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.prototype.defaultShapes.message=z;mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(b,a,d,c,e){b.translate(a,d);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,
e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=C;mxUtils.extend(E,mxShape);E.prototype.getLabelBounds=function(b){return new mxRectangle(b.x+b.width/6,b.y,5*b.width/6,b.height)};E.prototype.paintBackground=function(b,a,d,c,e){b.translate(a,d);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/
6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=E;mxUtils.extend(F,mxEllipse);F.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+c/8,d+e);b.lineTo(a+7*c/8,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=F;mxUtils.extend(D,mxShape);D.prototype.paintVertexShape=function(b,a,d,c,e){b.translate(a,d);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);
b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=D;mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};K.prototype.paintBackground=function(b,a,d,c,e){b.translate(a,d);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};K.prototype.paintForeground=function(b,a,d,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};
@@ -2624,22 +2662,22 @@ mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,d.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(b,a,d,c,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(a,d);b.ellipse((c-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(c/2,f);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=I;mxUtils.extend(L,
mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(b,a,d,c,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(a,d);b.begin();b.moveTo(c/2,f+g);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-f)/2-g,f/2);b.quadTo((c-f)/2-g,f+g,c/2,f+g);b.quadTo((c+f)/2+g,f+g,(c+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=L;mxUtils.extend(M,
mxCylinder);M.prototype.jettyWidth=32;M.prototype.jettyHeight=12;M.prototype.redrawPath=function(b,a,d,c,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));a=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));d=g/2;var g=d+g/2,k=.3*e-a/2,l=.7*e-a/2;f?(b.moveTo(d,k),b.lineTo(g,k),b.lineTo(g,k+a),b.lineTo(d,k+a),b.moveTo(d,l),b.lineTo(g,l),b.lineTo(g,l+a),b.lineTo(d,l+a)):(b.moveTo(d,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(d,e),b.lineTo(d,l+a),b.lineTo(0,
-l+a),b.lineTo(0,l),b.lineTo(d,l),b.lineTo(d,k+a),b.lineTo(0,k+a),b.lineTo(0,k),b.lineTo(d,k),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.component=M;mxUtils.extend(Q,mxDoubleEllipse);Q.prototype.outerStroke=!0;Q.prototype.paintVertexShape=function(b,a,d,c,e){var f=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(a+f,d+f,c-2*f,e-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(a,d,c,e),b.stroke())};mxCellRenderer.prototype.defaultShapes.endState=Q;mxUtils.extend(W,
-Q);W.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=W;mxUtils.extend(O,mxArrowConnector);O.prototype.defaultWidth=4;O.prototype.isOpenEnded=function(){return!0};O.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};O.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=O;mxUtils.extend(G,mxArrowConnector);G.prototype.defaultWidth=10;G.prototype.defaultArrowWidth=
-20;G.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};G.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};G.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=G;mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.redrawPath=
-function(b,a,d,c,e){a=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,a),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.manualInput=X;mxUtils.extend(N,mxRectangleShape);N.prototype.dx=20;N.prototype.dy=20;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.paintForeground=function(b,
+l+a),b.lineTo(0,l),b.lineTo(d,l),b.lineTo(d,k+a),b.lineTo(0,k+a),b.lineTo(0,k),b.lineTo(d,k),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.component=M;mxUtils.extend(Q,mxDoubleEllipse);Q.prototype.outerStroke=!0;Q.prototype.paintVertexShape=function(b,a,d,c,e){var f=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(a+f,d+f,c-2*f,e-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(a,d,c,e),b.stroke())};mxCellRenderer.prototype.defaultShapes.endState=Q;mxUtils.extend(X,
+Q);X.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=X;mxUtils.extend(N,mxArrowConnector);N.prototype.defaultWidth=4;N.prototype.isOpenEnded=function(){return!0};N.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};N.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=N;mxUtils.extend(G,mxArrowConnector);G.prototype.defaultWidth=10;G.prototype.defaultArrowWidth=
+20;G.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};G.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};G.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=G;mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.redrawPath=
+function(b,a,d,c,e){a=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,a),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.manualInput=W;mxUtils.extend(O,mxRectangleShape);O.prototype.dx=20;O.prototype.dy=20;O.prototype.isHtmlAllowed=function(){return!1};O.prototype.paintForeground=function(b,
a,d,c,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(c*g,e*g));g=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(a,d+f);b.lineTo(a+c,d+f);b.end();b.stroke();b.begin();b.moveTo(a+g,d);b.lineTo(a+g,
-d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=N;mxUtils.extend(da,mxActor);da.prototype.dx=20;da.prototype.dy=20;da.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=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(b,
-[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(a,d),new mxPoint(a,e),new mxPoint(0,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.corner=da;mxUtils.extend(Y,mxActor);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=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(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint((c+a)/2,d),new mxPoint((c+a)/2,e),new mxPoint((c-a)/2,e),new mxPoint((c-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=Y;mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowWidth",this.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=R;mxUtils.extend(P,mxActor);P.prototype.redrawPath=
-function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(a,0),new mxPoint(a,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,f),
-new mxPoint(a,f),new mxPoint(a,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=P;mxUtils.extend(S,mxActor);S.prototype.size=.1;S.prototype.redrawPath=function(b,a,d,c,e){a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(a,0);b.lineTo(c,0);b.quadTo(c-2*a,e/2,c,e);b.lineTo(a,e);b.quadTo(a-2*a,e/2,a,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=S;mxUtils.extend(V,mxActor);V.prototype.redrawPath=
-function(b,a,d,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.or=V;mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(b,a,d,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.xor=ea;mxUtils.extend(ba,mxActor);ba.prototype.size=20;ba.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(a,0),new mxPoint(c-a,0),new mxPoint(c,.8*a),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=ba;mxUtils.extend(T,mxActor);T.prototype.size=.375;T.prototype.redrawPath=function(b,a,d,c,e){a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-a),new mxPoint(c/2,e),new mxPoint(0,e-a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=T;mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+c/2,d+e);b.lineTo(a+c,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=
-aa;mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+e/2);b.lineTo(a+c,d+e/2);b.end();b.stroke();b.begin();b.moveTo(a+c/2,d);b.lineTo(a+c/2,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ca;mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();
-b.moveTo(a+.145*c,d+.145*e);b.lineTo(a+.855*c,d+.855*e);b.end();b.stroke();b.begin();b.moveTo(a+.855*c,d+.145*e);b.lineTo(a+.145*c,d+.855*e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=U;mxUtils.extend(Z,mxRhombus);Z.prototype.paintVertexShape=function(b,a,d,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+e/2);b.lineTo(a+c,d+e/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=Z;mxUtils.extend(ha,
+d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=O;mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=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(b,
+[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(a,d),new mxPoint(a,e),new mxPoint(0,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.corner=ca;mxUtils.extend(Y,mxActor);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=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(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint((c+a)/2,d),new mxPoint((c+a)/2,e),new mxPoint((c-a)/2,e),new mxPoint((c-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=Y;mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",this.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=S;mxUtils.extend(P,mxActor);P.prototype.redrawPath=
+function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(a,0),new mxPoint(a,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,f),
+new mxPoint(a,f),new mxPoint(a,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=P;mxUtils.extend(R,mxActor);R.prototype.size=.1;R.prototype.redrawPath=function(b,a,d,c,e){a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(a,0);b.lineTo(c,0);b.quadTo(c-2*a,e/2,c,e);b.lineTo(a,e);b.quadTo(a-2*a,e/2,a,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=R;mxUtils.extend(V,mxActor);V.prototype.redrawPath=
+function(b,a,d,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.or=V;mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(b,a,d,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.xor=da;mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(a,0),new mxPoint(c-a,0),new mxPoint(c,.8*a),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=Z;mxUtils.extend(T,mxActor);T.prototype.size=.375;T.prototype.redrawPath=function(b,a,d,c,e){a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-a),new mxPoint(c/2,e),new mxPoint(0,e-a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=T;mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+c/2,d+e);b.lineTo(a+c,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=
+ba;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+e/2);b.lineTo(a+c,d+e/2);b.end();b.stroke();b.begin();b.moveTo(a+c/2,d);b.lineTo(a+c/2,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ea;mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();
+b.moveTo(a+.145*c,d+.145*e);b.lineTo(a+.855*c,d+.855*e);b.end();b.stroke();b.begin();b.moveTo(a+.855*c,d+.145*e);b.lineTo(a+.145*c,d+.855*e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=U;mxUtils.extend(aa,mxRhombus);aa.prototype.paintVertexShape=function(b,a,d,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+e/2);b.lineTo(a+c,d+e/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=aa;mxUtils.extend(ha,
mxEllipse);ha.prototype.paintVertexShape=function(b,a,d,c,e){b.begin();b.moveTo(a,d);b.lineTo(a+c,d);b.lineTo(a+c/2,d+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(a,d+e);b.lineTo(a+c,d+e);b.lineTo(a+c/2,d+e/2);b.close();b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ha;mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(b,a,d,c,e){var f=d+e-5;b.begin();b.moveTo(a,d);b.lineTo(a,d+e);b.moveTo(a,f);b.lineTo(a+10,f-5);b.moveTo(a,f);b.lineTo(a+10,f+5);b.moveTo(a,
f);b.lineTo(a+c,f);b.moveTo(a+c,d);b.lineTo(a+c,d+e);b.moveTo(a+c,f);b.lineTo(a+c-10,f-5);b.moveTo(a+c,f);b.lineTo(a+c-10,f+5);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=fa;mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,a,d,c,e){this.outline||b.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(b.setStrokeColor(this.stroke),b.rect(a,d,c,e),b.fill(),"1"==mxUtils.getValue(this.style,"top","1")&&(b.begin(),
b.moveTo(a,d),b.lineTo(a+c,d),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"right","1")&&(b.begin(),b.moveTo(a+c,d),b.lineTo(a+c,d+e),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"bottom","1")&&(b.begin(),b.moveTo(a+c,d+e),b.lineTo(a,d+e),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"left","1")&&(b.begin(),b.moveTo(a,d+e),b.lineTo(a,d),b.end(),b.stroke()))};mxCellRenderer.prototype.defaultShapes.partialRectangle=ka;mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=
@@ -2650,7 +2688,7 @@ n/2);b.stroke()}});mxMarker.addMarker("cross",function(b,a,d,c,e,f,g,k,l,m){var
b.moveTo(n.x-e*l,n.y-f*l);b.lineTo(n.x-2*q+e*l,n.y-2*v+f*l);b.moveTo(n.x-q-v+f*l,n.y-v+q-e*l);b.lineTo(n.x+v-q-f*l,n.y-v-q+e*l);b.stroke()}});mxMarker.addMarker("async",function(b,a,d,c,e,f,g,k,l,m){a=e*l*1.118;d=f*l*1.118;e*=g+l;f*=g+l;var n=c.clone();n.x-=a;n.y-=d;c.x+=1*-e-a;c.y+=1*-f-d;return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-e-f/2,n.y-f+e/2):b.lineTo(n.x+f/2-e,n.y-f-e/2);b.lineTo(n.x-e,n.y-f);b.close();m?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=
null!=b?b:2;return function(a,d,c,e,f,g,k,l,m,n){f*=k+m;g*=k+m;var p=e.clone();return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-f-g/b,p.y-g+f/b):a.lineTo(p.x+g/b-f,p.y-g-f/b);a.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Aa=function(b,a,d){return qa(b,["width"],a,function(a,c,e,f,g){g=b.shape.getEdgeWidth()*b.view.scale+d;return new mxPoint(f.x+c*a/4+e*g/2,f.y+e*a/4-c*g/2)},function(a,c,e,f,g,k){a=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));b.style.width=Math.round(2*
a)/b.view.scale-d})},qa=function(b,a,d,c,e){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,m=d?f[0]:f[g],n=d?f[1]:f[g-1],p=n.x-m.x,q=n.y-m.y,v=Math.sqrt(p*p+q*q);return ga(b,a,function(b){b=c.call(this,v,p/v,q/v,m,n);return new mxPoint(b.x/l-k.x,b.y/l-k.y)},function(b,a,d){b=Math.sqrt(p*p+q*q);a.x=(a.x+k.x)*l;a.y=(a.y+k.y)*l;e.call(this,b,p/b,q/b,m,n,a,d)})},oa=function(b){return function(a){return[ga(a,["arrowWidth","arrowSize"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",R.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(a.x+(1-c)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(a.y+a.height/2-d.y)/a.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},wa=function(b,a,d){return function(c){var e=[ga(c,["size"],function(d){var c=Math.max(0,Math.min(d.width,Math.min(d.height,
+"arrowWidth",S.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(a.x+(1-c)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(a.y+a.height/2-d.y)/a.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},wa=function(b,a,d){return function(c){var e=[ga(c,["size"],function(d){var c=Math.max(0,Math.min(d.width,Math.min(d.height,
parseFloat(mxUtils.getValue(this.state.style,"size",a)))))*b;return new mxPoint(d.x+c,d.y+c)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,d.x-a.x),Math.min(a.height,d.y-a.y)))/b)})];d&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ma(c));return e}},sa=function(b,a,d){d=null!=d?d:1;return function(c){var e=[ga(c,["size"],function(a){var d=parseFloat(mxUtils.getValue(this.state.style,"size",b));return new mxPoint(a.x+d*a.width,a.getCenterY())},
function(b,a){this.state.style.size=Math.max(0,Math.min(d,(a.x-b.x)/b.width))})];a&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ma(c));return e}},Ba=function(b){return function(a){var d=[ga(a,["size"],function(a){var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(a.x+d*a.width*.75,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(b,(d.x-a.x)/(.75*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
!1)&&d.push(ma(a));return d}},ra=function(){return function(b){var a=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a}},ma=function(b,a){return ga(b,[mxConstants.STYLE_ARCSIZE],function(d){var c=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(d.x+d.width-Math.min(Math.max(d.width/2,d.height/2),Math.min(d.width,d.height)*c),d.y+(null!=a?a:d.height/8))},function(b,a,d){this.state.style[mxConstants.STYLE_ARCSIZE]=
@@ -2669,23 +2707,23 @@ parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFA
[ga(b,["width","height"],function(b){var a=Math.max(J.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),d=Math.max(1.5*J.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(b.width,a.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(b.height,a.y-b.y)))},
!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},process:function(b){var a=[ga(b,["size"],function(b){var a=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(b.x+b.width*a,b.y+b.height/4)},function(b,a){this.state.style.size=Math.max(0,Math.min(.5,(a.x-b.x)/b.width))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},cross:function(b){return[ga(b,["size"],function(b){var a=
Math.min(b.width,b.height),a=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ia.prototype.size)))*a/2;return new mxPoint(b.getCenterX()-a,b.getCenterY()-a)},function(b,a){var d=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-a.y)/d*2,Math.max(0,b.getCenterX()-a.x)/d*2)))})]},note:function(a){return[ga(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-b.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-a.x),Math.min(b.height,a.y-b.y))))})]},manualInput:function(b){var a=[ga(b,["size"],function(b){var a=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",X.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*a/4)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(a.y-b.y)/3)))})];mxUtils.getValue(b.style,
-mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},dataStorage:function(b){return[ga(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(b.x+(1-a)*b.width,b.getCenterY())},function(b,a){this.state.style.size=Math.max(0,Math.min(1,(b.x+b.width-a.x)/b.width))})]},internalStorage:function(b){var a=[ga(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",N.prototype.dx))),
-d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",N.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},corner:function(b){return[ga(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),
-d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},tee:function(b){return[ga(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",Y.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));
+b.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-a.x),Math.min(b.height,a.y-b.y))))})]},manualInput:function(b){var a=[ga(b,["size"],function(b){var a=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*a/4)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(a.y-b.y)/3)))})];mxUtils.getValue(b.style,
+mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},dataStorage:function(b){return[ga(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(b.x+(1-a)*b.width,b.getCenterY())},function(b,a){this.state.style.size=Math.max(0,Math.min(1,(b.x+b.width-a.x)/b.width))})]},internalStorage:function(b){var a=[ga(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),
+d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},corner:function(b){return[ga(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),
+d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},tee:function(b){return[ga(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",Y.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));
return new mxPoint(b.x+(b.width+a)/2,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,a.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},singleArrow:oa(1),doubleArrow:oa(.5),folder:function(b){return[ga(b,["tabWidth","tabHeight"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",
g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(a=b.width-a);return new mxPoint(b.x+a,b.y+d)},function(b,a){var d=Math.max(0,Math.min(b.width,a.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);this.state.style.tabWidth=Math.round(d);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},document:function(b){return[ga(b,["size"],
function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-a)*b.height)},function(b,a){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-a.y)/b.height))})]},tape:function(b){return[ga(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(b.getCenterX(),b.y+a*b.height/2)},function(b,a){this.state.style.size=
-Math.max(0,Math.min(1,(a.y-b.y)/b.height*2))})]},offPageConnector:function(b){return[ga(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-a)*b.height)},function(b,a){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-a.y)/b.height))})]},step:sa(x.prototype.size,!0),hexagon:sa(z.prototype.size,!0,.5),curlyBracket:sa(q.prototype.size,!1),display:sa(pa.prototype.size,!1),cube:wa(1,
-a.prototype.size,!1),card:wa(.5,k.prototype.size,!0),loopLimit:wa(.5,ba.prototype.size,!0),trapezoid:Ba(.5),parallelogram:Ba(1)};Graph.createHandle=ga;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE);b=xa[b];if(null!=
-b)return b(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var b=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=xa[b];if(null!=b)return b(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ta=new mxPoint(1,0),ua=new mxPoint(1,0),oa=mxUtils.toRadians(-30),ta=mxUtils.getRotatedPoint(ta,
-Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),ua=mxUtils.getRotatedPoint(ua,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(b,a,d,c,e){var f=b.view;c=null!=c&&0<c.length?c[0]:null;var g=b.absolutePoints,k=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(b,c));null==k&&null!=a&&(k=new mxPoint(a.getCenterX(),a.getCenterY()));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));var l=ta.x,m=ta.y,n=ua.x,p=ua.y,q="horizontal"==mxUtils.getValue(b.style,"elbow",
-"horizontal");if(null!=g&&null!=k){b=function(b,a,d){b-=v.x;var c=a-v.y;a=(p*b-n*c)/(l*p-m*n);b=(m*b-l*c)/(m*n-l*p);q?(d&&(v=new mxPoint(v.x+l*a,v.y+m*a),e.push(v)),v=new mxPoint(v.x+n*b,v.y+p*b)):(d&&(v=new mxPoint(v.x+n*b,v.y+p*b),e.push(v)),v=new mxPoint(v.x+l*a,v.y+m*a));e.push(v)};var v=k;null==c&&(c=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));b(c.x,c.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ga=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(b,a){if(a==mxEdgeStyle.IsometricConnector){var d=new mxElbowEdgeHandler(b);d.snapToTerminals=!1;return d}return Ga.apply(this,arguments)};c.prototype.constraints=[];f.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;y.prototype.constraints=mxRectangleShape.prototype.constraints;
-b.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=
-mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,
+Math.max(0,Math.min(1,(a.y-b.y)/b.height*2))})]},offPageConnector:function(b){return[ga(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-a)*b.height)},function(b,a){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-a.y)/b.height))})]},step:sa(x.prototype.size,!0),hexagon:sa(y.prototype.size,!0,.5),curlyBracket:sa(q.prototype.size,!1),display:sa(pa.prototype.size,!1),cube:wa(1,
+a.prototype.size,!1),card:wa(.5,k.prototype.size,!0),loopLimit:wa(.5,Z.prototype.size,!0),trapezoid:Ba(.5),parallelogram:Ba(1)};Graph.createHandle=ga;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE);b=xa[b];if(null!=b)return b(this.state)}return null};
+mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var b=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=xa[b];if(null!=b)return b(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ta=new mxPoint(1,0),ua=new mxPoint(1,0),oa=mxUtils.toRadians(-30),ta=mxUtils.getRotatedPoint(ta,Math.cos(oa),Math.sin(oa)),
+oa=mxUtils.toRadians(-150),ua=mxUtils.getRotatedPoint(ua,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(b,a,d,c,e){var f=b.view;c=null!=c&&0<c.length?c[0]:null;var g=b.absolutePoints,k=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(b,c));null==k&&null!=a&&(k=new mxPoint(a.getCenterX(),a.getCenterY()));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));var l=ta.x,m=ta.y,n=ua.x,p=ua.y,q="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=
+g&&null!=k){b=function(b,a,d){b-=v.x;var c=a-v.y;a=(p*b-n*c)/(l*p-m*n);b=(m*b-l*c)/(m*n-l*p);q?(d&&(v=new mxPoint(v.x+l*a,v.y+m*a),e.push(v)),v=new mxPoint(v.x+n*b,v.y+p*b)):(d&&(v=new mxPoint(v.x+n*b,v.y+p*b),e.push(v)),v=new mxPoint(v.x+l*a,v.y+m*a));e.push(v)};var v=k;null==c&&(c=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));b(c.x,c.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ga=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=
+function(b,a){if(a==mxEdgeStyle.IsometricConnector){var d=new mxElbowEdgeHandler(b);d.snapToTerminals=!1;return d}return Ga.apply(this,arguments)};c.prototype.constraints=[];f.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;b.prototype.constraints=
+mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxEllipse.prototype.constraints;
+ja.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;T.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)];M.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=
@@ -2698,8 +2736,8 @@ e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxC
.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!1),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)];n.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=
mxRectangleShape.prototype.constraints;m.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;Y.prototype.constraints=null;da.prototype.constraints=null;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)];ia.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)];H.prototype.constraints=null;V.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)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0)];mxArrow.prototype.constraints=null;Y.prototype.constraints=null;ca.prototype.constraints=null;S.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)];ia.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)];H.prototype.constraints=null;V.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)];da.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(b){d.escape();var a=d.getDeletableCells(d.getSelectionCells());if(null!=a&&0<a.length){var c=d.model.getParents(a);d.removeCells(a,b);if(null!=c){b=[];for(a=0;a<c.length;a++)d.model.contains(c[a])&&(d.model.isVertex(c[a])||d.model.isEdge(c[a]))&&b.push(c[a]);d.setSelectionCells(b)}}}var c=this.editorUi,f=c.editor,d=f.graph,b=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.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(b,a){try{var d=mxUtils.parseXml(b),c=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,c);var e=c.getChildren(c.getChildAt(c.getRoot(),0));f.graph.setSelectionCells(f.graph.importCells(e))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@@ -2815,8 +2853,8 @@ m=l.cloneNode(!1);l.style.backgroundColor="#d7d7d7";m.style.backgroundColor="#d7
mxUtils.write(m,mxResources.get("arrange"));f.appendChild(m);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);c(l,d,k++);c(m,f,k++)}}};BaseFormatPanel=function(a,c,f){this.format=a;this.editorUi=c;this.container=f;this.listeners=[]};
BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),f=null,d=0;d<c.length;d++){var b=a.view.getState(c[d]);if(null!=b&&(b=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),null!=b))if(null==f)f=b;else if(f!=b)return null}return f};
BaseFormatPanel.prototype.installInputHandler=function(a,c,f,d,b,e,g,k){e=null!=e?e:"";k=null!=k?k:!1;var l=this.editorUi,m=l.editor.graph;d=null!=d?d:1;b=null!=b?b:999;var n=null,p=!1,q=mxUtils.bind(this,function(q){var t=k?parseFloat(a.value):parseInt(a.value);isNaN(t)||c!=mxConstants.STYLE_ROTATION||(t=mxUtils.mod(Math.round(100*t),36E3)/100);t=Math.min(b,Math.max(d,isNaN(t)?f:t));if(m.cellEditor.isContentEditing()&&g)p||(p=!0,null!=n&&(m.cellEditor.restoreSelection(n),n=null),g(t),a.value=t+e,
-p=!1);else if(t!=mxUtils.getValue(this.format.getSelectionState().style,c,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{if(m.setCellStyles(c,t,m.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var v=m.getSelectionCells(),x=0;x<v.length;x++){var z=v[x];if(m.isHtmlLabel(z)){var y=document.createElement("div");y.innerHTML=m.convertValueToString(z);for(var B=y.getElementsByTagName("font"),A=0;A<B.length;A++)B[A].removeAttribute("size"),B[A].style.fontSize=t+"px";m.cellLabelChanged(z,
-y.innerHTML)}}}finally{m.getModel().endUpdate()}l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[t],"cells",m.getSelectionCells()))}a.value=t+e;mxEvent.consume(q)});g&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){n=m.cellEditor.saveSelection()}),mxEvent.addListener(a,"touchstart",function(){n=m.cellEditor.saveSelection()}));mxEvent.addListener(a,"change",q);mxEvent.addListener(a,"blur",q);return q};
+p=!1);else if(t!=mxUtils.getValue(this.format.getSelectionState().style,c,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{if(m.setCellStyles(c,t,m.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var v=m.getSelectionCells(),x=0;x<v.length;x++){var y=v[x];if(m.isHtmlLabel(y)){var A=document.createElement("div");A.innerHTML=m.convertValueToString(y);for(var B=A.getElementsByTagName("font"),z=0;z<B.length;z++)B[z].removeAttribute("size"),B[z].style.fontSize=t+"px";m.cellLabelChanged(y,
+A.innerHTML)}}}finally{m.getModel().endUpdate()}l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[t],"cells",m.getSelectionCells()))}a.value=t+e;mxEvent.consume(q)});g&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){n=m.cellEditor.saveSelection()}),mxEvent.addListener(a,"touchstart",function(){n=m.cellEditor.saveSelection()}));mxEvent.addListener(a,"change",q);mxEvent.addListener(a,"blur",q);return q};
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,f,d,b,e){f=null!=f?f:1;d=null!=d?d:8;if(mxClient.IS_QUIRKS)d-=2;else if(mxClient.IS_MT||8<=document.documentMode)d+=1;var g=document.createElement("div");mxUtils.setPrefixedStyle(g.style,"borderRadius","3px");g.style.border="1px solid rgb(192, 192, 192)";g.style.position="absolute";var k=document.createElement("div");k.style.borderBottom="1px solid rgb(192, 192, 192)";k.style.position="relative";k.style.height=d+"px";k.style.width="10px";k.className=
"geBtnUp";g.appendChild(k);var l=k.cloneNode(!1);l.style.border="none";l.style.height=d+"px";l.className="geBtnDown";g.appendChild(l);mxEvent.addListener(l,"click",function(b){""==a.value&&(a.value=e||"2");var d=parseInt(a.value);isNaN(d)||(a.value=d-f,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(k,"click",function(b){""==a.value&&(a.value=e||"0");var d=parseInt(a.value);isNaN(d)||(a.value=d+f,null!=c&&c(b));mxEvent.consume(b)});if(b){var m=null;mxEvent.addGestureListeners(g,function(b){if(mxClient.IS_QUIRKS||
@@ -2861,10 +2899,10 @@ ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,f=c.editor.graph
b=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(b)?"":b+"°"}),g=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,l);f.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){f.getModel().removeListener(l)}});l()}return a};
ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,f=c.editor.graph,d=this.format.getSelectionState(),b=this.createPanel();b.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));b.appendChild(e);var g,k,l,m,n=this.addUnitInput(b,"pt",84,44,function(){g.apply(this,arguments)}),p=this.addUnitInput(b,"pt",20,44,function(){k.apply(this,arguments)}),
q=document.createElement("div");q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");q.style.position="relative";q.style.cursor="pointer";q.style.marginTop="-3px";q.style.border="0px";q.style.left="52px";mxUtils.setOpacity(q,50);mxEvent.addListener(q,"mouseenter",function(){mxUtils.setOpacity(q,100)});mxEvent.addListener(q,"mouseleave",function(){mxUtils.setOpacity(q,50)});mxEvent.addListener(q,"click",function(){c.actions.get("autosize").funct()});
-b.appendChild(q);this.addLabel(b,mxResources.get("width"),84);this.addLabel(b,mxResources.get("height"),20);mxUtils.br(b);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var t=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");t.style.width="100%";e.appendChild(t);b.appendChild(e);this.addKeyHandler(n,z);this.addKeyHandler(p,z);g=this.addGeometryHandler(n,
+b.appendChild(q);this.addLabel(b,mxResources.get("width"),84);this.addLabel(b,mxResources.get("height"),20);mxUtils.br(b);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var t=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");t.style.width="100%";e.appendChild(t);b.appendChild(e);this.addKeyHandler(n,y);this.addKeyHandler(p,y);g=this.addGeometryHandler(n,
function(b,a){0<b.width&&(b.width=Math.max(1,a))});k=this.addGeometryHandler(p,function(b,a){0<b.height&&(b.height=Math.max(1,a))});a.appendChild(b);var u=this.createPanel();u.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("position"));u.appendChild(e);var v=this.addUnitInput(u,"pt",84,44,function(){l.apply(this,arguments)}),x=this.addUnitInput(u,"pt",20,44,
-function(){m.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),84);this.addLabel(u,mxResources.get("top"),20);var z=mxUtils.bind(this,function(a,c,e){d=this.format.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)b.style.display="none";else{b.style.display="";if(e||document.activeElement!=n)n.value=d.width+(""==d.width?"":" pt");if(e||document.activeElement!=p)p.value=d.height+(""==d.height?"":" pt")}if(d.vertices.length==
-f.getSelectionCount()&&null!=d.x&&null!=d.y){u.style.display="";if(e||document.activeElement!=v)v.value=d.x+(""==d.x?"":" pt");if(e||document.activeElement!=x)x.value=d.y+(""==d.y?"":" pt")}else u.style.display="none"});this.addKeyHandler(v,z);this.addKeyHandler(x,z);f.getModel().addListener(mxEvent.CHANGE,z);this.listeners.push({destroy:function(){f.getModel().removeListener(z)}});z();l=this.addGeometryHandler(v,function(b,a){b.relative?b.offset.x=a:b.x=a});m=this.addGeometryHandler(x,function(b,
+function(){m.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),84);this.addLabel(u,mxResources.get("top"),20);var y=mxUtils.bind(this,function(a,c,e){d=this.format.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)b.style.display="none";else{b.style.display="";if(e||document.activeElement!=n)n.value=d.width+(""==d.width?"":" pt");if(e||document.activeElement!=p)p.value=d.height+(""==d.height?"":" pt")}if(d.vertices.length==
+f.getSelectionCount()&&null!=d.x&&null!=d.y){u.style.display="";if(e||document.activeElement!=v)v.value=d.x+(""==d.x?"":" pt");if(e||document.activeElement!=x)x.value=d.y+(""==d.y?"":" pt")}else u.style.display="none"});this.addKeyHandler(v,y);this.addKeyHandler(x,y);f.getModel().addListener(mxEvent.CHANGE,y);this.listeners.push({destroy:function(){f.getModel().removeListener(y)}});y();l=this.addGeometryHandler(v,function(b,a){b.relative?b.offset.x=a:b.x=a});m=this.addGeometryHandler(x,function(b,
a){b.relative?b.offset.y=a:b.y=a});a.appendChild(u)};
ArrangePanel.prototype.addGeometryHandler=function(a,c){function f(e){if(""!=a.value){var f=parseFloat(a.value);if(f!=b){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),l=0;l<k.length;l++)if(d.getModel().isVertex(k[l])){var m=d.getCellGeometry(k[l]);null!=m&&(m=m.clone(),c(m,f),d.getModel().setGeometry(k[l],m))}}finally{d.getModel().endUpdate()}b=f;a.value=f+" pt"}else isNaN(f)&&(a.value=b+" pt")}mxEvent.consume(e)}var d=this.editorUi.editor.graph,b=null;mxEvent.addListener(a,"blur",
f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){b=a.value});return f};
@@ -2878,23 +2916,23 @@ k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px
"0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");k=e.cloneNode(!1);k.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+
" ("+this.editorUi.actions.get("underline").shortcut+")");var n=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([n]);var p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_LEFT]),p),t=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),p),u=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
-[mxConstants.ALIGN_RIGHT]),p);this.styleButtons([q,t,u]);if(d.cellEditor.isContentEditing()){var v=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([v])}var x=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),z=this.editorUi.toolbar.addButton("geSprite-middle",
-mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),y=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([x,z,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var B,A,C,E,F,D,K;d.cellEditor.isContentEditing()?(x.style.display="none",z.style.display="none",
-y.style.display="none",n.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,B=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),A=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
+[mxConstants.ALIGN_RIGHT]),p);this.styleButtons([q,t,u]);if(d.cellEditor.isContentEditing()){var v=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([v])}var x=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),y=this.editorUi.toolbar.addButton("geSprite-middle",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),A=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([x,y,A]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var B,z,C,E,F,D,K;d.cellEditor.isContentEditing()?(x.style.display="none",y.style.display="none",
+A.style.display="none",n.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,B=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),z=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
C.style.marginRight="9px",v=p.cloneNode(!1),v.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
!1,null)},v),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},v)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),v.style.height="40"),a.appendChild(v)):(m[2].style.marginRight="9px",u.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px";
p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var H=document.createElement("select");H.style.position="absolute";H.style.right="20px";H.style.width="97px";H.style.marginTop="-2px";for(var J="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),I={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]},v=0;v<J.length;v++){var L=document.createElement("option");L.setAttribute("value",J[v]);mxUtils.write(L,mxResources.get(J[v]));H.appendChild(L)}p.appendChild(H);J=e.cloneNode(!1);J.style.marginLeft="0px";J.style.paddingTop=
-"4px";J.style.paddingBottom="4px";J.style.fontWeight="normal";mxUtils.write(J,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 L=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},v=0;v<L.length;v++){var W=document.createElement("option");W.setAttribute("value",L[v]);mxUtils.write(W,
-mxResources.get(L[v]));M.appendChild(W)}J.appendChild(M);d.isEditing()||(a.appendChild(p),mxEvent.addListener(H,"change",function(b){d.getModel().beginUpdate();try{var a=I[H.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
-a.appendChild(J),mxEvent.addListener(M,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[M.value],d.getSelectionCells());mxEvent.consume(b)}));var O=document.createElement("input");O.style.textAlign="right";O.style.marginTop="4px";mxClient.IS_QUIRKS||(O.style.position="absolute",O.style.right="32px");O.style.width="46px";O.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(O);var G=null,p=this.installInputHandler(O,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
-1,999," pt",function(b){G=b;document.execCommand("fontSize",!1,"4");b=d.cellEditor.textarea.getElementsByTagName("font");for(var a=0;a<b.length;a++)if("4"==b[a].getAttribute("size")){b[a].removeAttribute("size");b[a].style.fontSize=G+"px";window.setTimeout(function(){O.value=G+" pt";G=null},0);break}},!0),p=this.createStepper(O,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=O.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
-k.style.cssFloat="right";var X=null,N="#ffffff",da=null,Y="#000000",R=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return N},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){X=b},destroy:function(){X=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");R.style.fontWeight="bold";var P=this.createCellColorOption(mxResources.get("borderColor"),
-mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");P.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Y},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){da=b},destroy:function(){da=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){R.style.display=null==b||b==mxConstants.NONE?"none":"";
-P.style.display=R.style.display},function(b){null==b||b==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(R);d.cellEditor.isContentEditing()||g.appendChild(P);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,
+"4px";J.style.paddingBottom="4px";J.style.fontWeight="normal";mxUtils.write(J,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 L=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},v=0;v<L.length;v++){var X=document.createElement("option");X.setAttribute("value",L[v]);mxUtils.write(X,
+mxResources.get(L[v]));M.appendChild(X)}J.appendChild(M);d.isEditing()||(a.appendChild(p),mxEvent.addListener(H,"change",function(b){d.getModel().beginUpdate();try{var a=I[H.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
+a.appendChild(J),mxEvent.addListener(M,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[M.value],d.getSelectionCells());mxEvent.consume(b)}));var N=document.createElement("input");N.style.textAlign="right";N.style.marginTop="4px";mxClient.IS_QUIRKS||(N.style.position="absolute",N.style.right="32px");N.style.width="46px";N.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(N);var G=null,p=this.installInputHandler(N,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+1,999," pt",function(b){G=b;document.execCommand("fontSize",!1,"4");b=d.cellEditor.textarea.getElementsByTagName("font");for(var a=0;a<b.length;a++)if("4"==b[a].getAttribute("size")){b[a].removeAttribute("size");b[a].style.fontSize=G+"px";window.setTimeout(function(){N.value=G+" pt";G=null},0);break}},!0),p=this.createStepper(N,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=N.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
+k.style.cssFloat="right";var W=null,O="#ffffff",ca=null,Y="#000000",S=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return O},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){W=b},destroy:function(){W=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");S.style.fontWeight="bold";var P=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");P.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Y},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){ca=b},destroy:function(){ca=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){S.style.display=null==b||b==mxConstants.NONE?"none":"";
+P.style.display=S.style.display},function(b){null==b||b==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(S);d.cellEditor.isContentEditing()||g.appendChild(P);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,
"wrap","null",null,null,!0);k.style.fontWeight="bold";b.containsLabel||b.autoSize||0!=b.edges.length||g.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,f.actions.get("formattedText"));k.style.fontWeight="bold";g.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";p=document.createElement("div");p.style.position="absolute";p.style.width="70px";p.style.marginTop="0px";p.style.fontWeight=
-"bold";mxUtils.write(p,mxResources.get("spacing"));k.appendChild(p);var S,V,ea,ba,T,aa=this.addUnitInput(k,"pt",91,44,function(){S.apply(this,arguments)}),ca=this.addUnitInput(k,"pt",20,44,function(){V.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var U=this.addUnitInput(k,"pt",162,44,function(){ea.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",91,44,function(){ba.apply(this,arguments)}),
+"bold";mxUtils.write(p,mxResources.get("spacing"));k.appendChild(p);var R,V,da,Z,T,ba=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),ea=this.addUnitInput(k,"pt",20,44,function(){V.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var U=this.addUnitInput(k,"pt",162,44,function(){da.apply(this,arguments)}),aa=this.addUnitInput(k,"pt",91,44,function(){Z.apply(this,arguments)}),
ha=this.addUnitInput(k,"pt",20,44,function(){T.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(d.cellEditor.isContentEditing()){var fa=null,ka=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(b){var a=""==b.value?120:parseInt(b.value),a=Math.max(0,isNaN(a)?120:a);null!=fa&&(d.cellEditor.restoreSelection(fa),fa=null);for(var c=
d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;null!=c&&c==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("P"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="<p>"+d.cellEditor.textarea.innerHTML+"</p>"),c=d.cellEditor.textarea.firstChild);null!=c&&c!=d.cellEditor.textarea&&(c.style.lineHeight=a+"%");b.value=a+" %"},function(b){ka=b;mxEvent.addListener(b,"mousedown",function(){fa=d.cellEditor.saveSelection()});
mxEvent.addListener(b,"touchstart",function(){fa=d.cellEditor.saveSelection()});b.value="120 %"}));g=e.cloneNode(!1);g.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],g,!0);p=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},g),this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(b){this.editorUi.menus.addInsertTableItem(b)}))];
@@ -2906,16 +2944,16 @@ g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.create
function(b,a,d,c){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){F.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=F){var b=F.getAttribute("cellPadding")||0,b=new FilenameDialog(f,b,mxResources.get("apply"),mxUtils.bind(this,function(b){null!=b&&0<b.length?F.setAttribute("cellPadding",
b):F.removeAttribute("cellPadding")}),mxResources.get("spacing"));f.showDialog(b.container,300,80,!0,!0);b.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=F&&F.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=F&&F.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=F&&F.setAttribute("align","right")},
e)];this.styleButtons(p);p[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(g),mxUtils.br(g));g.appendChild(e);a.appendChild(g);E=g}else a.appendChild(g),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var ja=mxUtils.bind(this,function(a,d,e){b=this.format.getSelectionState();a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=O)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),O.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(q,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(x,a==mxConstants.ALIGN_TOP);c(z,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);H.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
+mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=N)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),N.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
+c(q,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(x,a==mxConstants.ALIGN_TOP);c(y,a==mxConstants.ALIGN_MIDDLE);c(A,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);H.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
"topLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(b.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(e||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING,2)),ca.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=aa)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_TOP,0)),aa.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(b.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),ha.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Z.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=U)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),U.value=isNaN(a)?"":a+" pt"});V=this.installInputHandler(ca,mxConstants.STYLE_SPACING,2,-999,999," pt");S=this.installInputHandler(aa,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");T=this.installInputHandler(ha,
-mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ba=this.installInputHandler(Z,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ea=this.installInputHandler(U,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(O,ja);this.addKeyHandler(ca,ja);this.addKeyHandler(aa,ja);this.addKeyHandler(ha,ja);this.addKeyHandler(Z,ja);this.addKeyHandler(U,ja);d.getModel().addListener(mxEvent.CHANGE,ja);this.listeners.push({destroy:function(){d.getModel().removeListener(ja)}});ja();if(d.cellEditor.isContentEditing()){var la=
+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(e||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING,2)),ea.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_TOP,0)),ba.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(b.style,
+mxConstants.STYLE_SPACING_RIGHT,0)),ha.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=aa)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),aa.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=U)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),U.value=isNaN(a)?"":a+" pt"});V=this.installInputHandler(ea,mxConstants.STYLE_SPACING,2,-999,999," pt");R=this.installInputHandler(ba,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");T=this.installInputHandler(ha,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");Z=this.installInputHandler(aa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");da=this.installInputHandler(U,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(N,ja);this.addKeyHandler(ea,ja);this.addKeyHandler(ba,ja);this.addKeyHandler(ha,ja);this.addKeyHandler(aa,ja);this.addKeyHandler(U,ja);d.getModel().addListener(mxEvent.CHANGE,ja);this.listeners.push({destroy:function(){d.getModel().removeListener(ja)}});ja();if(d.cellEditor.isContentEditing()){var la=
!1,e=function(){la||(la=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b){var a=mxUtils.getCurrentStyle(b);if(null!=a){c(m[0],"bold"==a.fontWeight||null!=d.getParentByName(b,"B",d.cellEditor.textarea));c(m[1],"italic"==a.fontStyle||null!=d.getParentByName(b,"I",d.cellEditor.textarea));c(m[2],null!=d.getParentByName(b,"U",d.cellEditor.textarea));c(q,"left"==a.textAlign);c(t,"center"==a.textAlign);c(u,"right"==
-a.textAlign);c(C,"justify"==a.textAlign);c(A,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(B,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));F=d.getParentByName(b,"TABLE",d.cellEditor.textarea);K=null==F?null:d.getParentByName(b,"TR",F);D=null==F?null:d.getParentByName(b,"TD",F);E.style.display=null!=F?"":"none";if(document.activeElement!=O){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=G?(b.removeAttribute("size"),b.style.fontSize=G+"px",G=null):O.value=parseFloat(a.fontSize)+
+a.textAlign);c(C,"justify"==a.textAlign);c(z,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(B,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));F=d.getParentByName(b,"TABLE",d.cellEditor.textarea);K=null==F?null:d.getParentByName(b,"TR",F);D=null==F?null:d.getParentByName(b,"TD",F);E.style.display=null!=F?"":"none";if(document.activeElement!=N){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=G?(b.removeAttribute("size"),b.style.fontSize=G+"px",G=null):N.value=parseFloat(a.fontSize)+
" pt";var b=b.style.lineHeight||a.lineHeight,e=parseFloat(b);"px"==b.substring(b.length-2)&&(e/=parseFloat(a.fontSize));"%"!=b.substring(b.length-1)&&(e*=100);ka.value=e+" %"}b=a.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,c){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});e=a.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,c){return"#"+
-("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});null!=da&&(Y="#"==b.charAt(0)?b:"#000000",da(Y,!0));null!=X&&(N="#"==e.charAt(0)?e:null,X(N,!0));null!=l.firstChild&&(a=a.fontFamily,"'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),l.firstChild.nodeValue=a)}}la=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});null!=ca&&(Y="#"==b.charAt(0)?b:"#000000",ca(Y,!0));null!=W&&(O="#"==e.charAt(0)?e:null,W(O,!0));null!=l.firstChild&&(a=a.fontFamily,"'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),l.firstChild.nodeValue=a)}}la=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);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()));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))};
@@ -2925,8 +2963,8 @@ StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,
null==b||b==mxConstants.NONE?"none":""}),e="image"==f.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,g=this.createCellColorOption(mxResources.get("fill"),e,"#ffffff");g.style.fontWeight="bold";e=mxUtils.getValue(f.style,e,null);b.style.display=null!=e&&e!=mxConstants.NONE&&f.fill&&"image"!=f.style.shape?"":"none";for(var e=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],k=0;k<e.length;k++){var l=document.createElement("option");
l.setAttribute("value",e[k]);mxUtils.write(l,mxResources.get(e[k]));d.appendChild(l)}b.appendChild(d);var m=mxUtils.bind(this,function(){f=this.format.getSelectionState();var c=mxUtils.getValue(f.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);d.value=c;a.style.display=f.fill?"":"none";c=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,null);b.style.display=!f.fill||f.containsImage||null==c||c==mxConstants.NONE?"none":""});c.getModel().addListener(mxEvent.CHANGE,
m);this.listeners.push({destroy:function(){c.getModel().removeListener(m)}});m();mxEvent.addListener(d,"change",function(b){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,c.getSelectionCells());mxEvent.consume(b)});a.appendChild(g);a.appendChild(b);"swimlane"==f.style.shape&&a.appendChild(this.createCellColorOption(mxResources.get("laneColor"),"swimlaneFillColor","#ffffff"));return a};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(x.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));x.value=c+" pt";mxEvent.consume(a)}function f(a){var c=parseInt(z.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
-c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));z.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var g=document.createElement("div");g.style.fontWeight=
+StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(x.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));x.value=c+" pt";mxEvent.consume(a)}function f(a){var c=parseInt(y.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
+c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));y.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var g=document.createElement("div");g.style.fontWeight=
"bold";var k=document.createElement("select");k.style.position="absolute";k.style.marginTop="-2px";k.style.right="72px";k.style.width="80px";for(var l=["sharp","rounded","curved"],m=0;m<l.length;m++){var n=document.createElement("option");n.setAttribute("value",l[m]);mxUtils.write(n,mxResources.get(l[m]));k.appendChild(n)}mxEvent.addListener(k,"change",function(a){b.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],e=["0",null];"rounded"==k.value?e=["1",null]:
"curved"==k.value&&(e=[null,"1"]);for(var f=0;f<c.length;f++)b.setCellStyles(c[f],e[f],b.getSelectionCells());d.fireEvent(new mxEventObject("styleChanged","keys",c,"values",e,"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(k,"click",function(b){mxEvent.consume(b)});var p="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,l=this.createCellColorOption(mxResources.get("line"),p,"#000000");l.appendChild(k);g.appendChild(l);
var q=g.cloneNode(!1);q.style.fontWeight="normal";q.style.whiteSpace="nowrap";q.style.position="relative";q.style.paddingLeft="16px";q.style.marginBottom="2px";q.style.marginTop="2px";q.className="geToolbarContainer";var t=mxUtils.bind(this,function(b,a,d,c,e){b=this.editorUi.menus.styleChange(b,"",c,e,"geIcon",null);c=document.createElement("div");c.style.width=a+"px";c.style.height="1px";c.style.borderBottom="1px "+d+" black";c.style.paddingTop="6px";b.firstChild.firstChild.style.padding="0px 4px 0px 4px";
@@ -2936,8 +2974,8 @@ mxResources.get("connection"),!1,mxUtils.bind(this,function(b){this.editorUi.men
mxResources.get("link"));this.editorUi.menus.styleChange(b,"",[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(b,"",[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"))})),
n=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(b){t(b,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));t(b,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));t(b,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
mxResources.get("dotted")+" (1)");t(b,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");t(b,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),l=q.cloneNode(!1),x=document.createElement("input");x.style.textAlign="right";x.style.marginTop="2px";x.style.width="41px";x.setAttribute("title",mxResources.get("linewidth"));q.appendChild(x);
-var z=x.cloneNode(!0);u.appendChild(z);var y=this.createStepper(x,c,1,9);y.style.display=x.style.display;y.style.marginTop="2px";q.appendChild(y);var B=this.createStepper(z,f,1,9);B.style.display=z.style.display;B.style.marginTop="2px";u.appendChild(B);mxClient.IS_QUIRKS?(x.style.height="17px",z.style.height="17px"):(x.style.position="absolute",x.style.right="32px",x.style.height="15px",y.style.right="20px",z.style.position="absolute",z.style.right="32px",z.style.height="15px",B.style.right="20px");
-mxEvent.addListener(x,"blur",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"blur",f);mxEvent.addListener(z,"change",f);mxClient.IS_QUIRKS&&(mxUtils.br(l),mxUtils.br(l));var A=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(b){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
+var y=x.cloneNode(!0);u.appendChild(y);var A=this.createStepper(x,c,1,9);A.style.display=x.style.display;A.style.marginTop="2px";q.appendChild(A);var B=this.createStepper(y,f,1,9);B.style.display=y.style.display;B.style.marginTop="2px";u.appendChild(B);mxClient.IS_QUIRKS?(x.style.height="17px",y.style.height="17px"):(x.style.position="absolute",x.style.right="32px",x.style.height="15px",A.style.right="20px",y.style.position="absolute",y.style.right="32px",y.style.height="15px",B.style.right="20px");
+mxEvent.addListener(x,"blur",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(y,"blur",f);mxEvent.addListener(y,"change",f);mxClient.IS_QUIRKS&&(mxUtils.br(l),mxUtils.br(l));var z=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(b){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(b,"",[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(b,"",[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(b,"",[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(b,"",[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(b,"",[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(b,"",[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"==e.style.shape&&this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,
@@ -2964,20 +3002,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(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",
null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],
["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",
-null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(v,8);this.addArrow(A);this.addArrow(C);this.addArrow(E);y=this.addArrow(m,9);y.className="geIcon";y.style.width="84px";B=this.addArrow(n,9);B.className="geIcon";B.style.width="22px";var F=document.createElement("div");F.style.width="85px";F.style.height="1px";F.style.borderBottom="1px solid black";F.style.marginBottom="9px";y.appendChild(F);var D=document.createElement("div");D.style.width="23px";D.style.height="1px";D.style.borderBottom=
-"1px solid black";D.style.marginBottom="9px";B.appendChild(D);m.style.height="15px";n.style.height="15px";v.style.height="15px";A.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";a.appendChild(g);a.appendChild(u);a.appendChild(q);m=q.cloneNode(!1);m.style.paddingBottom="6px";m.style.paddingTop="4px";m.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";
-n.style.marginTop="2px";n.style.fontWeight="normal";n.style.width="76px";mxUtils.write(n,mxResources.get("lineend"));m.appendChild(n);var K,H,J=this.addUnitInput(m,"pt",74,33,function(){K.apply(this,arguments)}),I=this.addUnitInput(m,"pt",20,33,function(){H.apply(this,arguments)});mxUtils.br(m);y=document.createElement("div");y.style.height="8px";m.appendChild(y);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,M,Q=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,
-arguments)}),W=this.addUnitInput(m,"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),74,50);this.addLabel(m,mxResources.get("size"),20,50);mxUtils.br(m);g=g.cloneNode(!1);g.style.fontWeight="normal";g.style.position="relative";g.style.paddingLeft="16px";g.style.marginBottom="2px";g.style.marginTop="6px";g.style.borderWidth="0px";g.style.paddingBottom="18px";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom=
-"12px";n.style.marginTop="1px";n.style.fontWeight="normal";n.style.width="120px";mxUtils.write(n,mxResources.get("perimeter"));g.appendChild(n);var O,G=this.addUnitInput(g,"pt",20,41,function(){O.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(m)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var X=mxUtils.bind(this,function(a,c,f){function g(b,a,c,f){c=
+null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(v,8);this.addArrow(z);this.addArrow(C);this.addArrow(E);A=this.addArrow(m,9);A.className="geIcon";A.style.width="84px";B=this.addArrow(n,9);B.className="geIcon";B.style.width="22px";var F=document.createElement("div");F.style.width="85px";F.style.height="1px";F.style.borderBottom="1px solid black";F.style.marginBottom="9px";A.appendChild(F);var D=document.createElement("div");D.style.width="23px";D.style.height="1px";D.style.borderBottom=
+"1px solid black";D.style.marginBottom="9px";B.appendChild(D);m.style.height="15px";n.style.height="15px";v.style.height="15px";z.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";a.appendChild(g);a.appendChild(u);a.appendChild(q);m=q.cloneNode(!1);m.style.paddingBottom="6px";m.style.paddingTop="4px";m.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";
+n.style.marginTop="2px";n.style.fontWeight="normal";n.style.width="76px";mxUtils.write(n,mxResources.get("lineend"));m.appendChild(n);var K,H,J=this.addUnitInput(m,"pt",74,33,function(){K.apply(this,arguments)}),I=this.addUnitInput(m,"pt",20,33,function(){H.apply(this,arguments)});mxUtils.br(m);A=document.createElement("div");A.style.height="8px";m.appendChild(A);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,M,Q=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,
+arguments)}),X=this.addUnitInput(m,"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),74,50);this.addLabel(m,mxResources.get("size"),20,50);mxUtils.br(m);g=g.cloneNode(!1);g.style.fontWeight="normal";g.style.position="relative";g.style.paddingLeft="16px";g.style.marginBottom="2px";g.style.marginTop="6px";g.style.borderWidth="0px";g.style.paddingBottom="18px";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom=
+"12px";n.style.marginTop="1px";n.style.fontWeight="normal";n.style.width="120px";mxUtils.write(n,mxResources.get("perimeter"));g.appendChild(n);var N,G=this.addUnitInput(g,"pt",20,41,function(){N.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(m)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var W=mxUtils.bind(this,function(a,c,f){function g(b,a,c,f){c=
c.getElementsByTagName("div")[0];c.className=d.getCssClassForMarker(f,e.style.shape,b,a);"geSprite geSprite-noarrow"==c.className&&(c.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),c.style.backgroundImage="none",c.style.verticalAlign="top",c.style.marginTop="5px",c.style.fontSize="10px",c.nextSibling.style.marginTop="0px");return c}e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(f||document.activeElement!=x)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,
-1)),x.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=z)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),z.value=isNaN(a)?"":a+" pt";k.style.visibility="connector"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?k.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,
-null)?F.style.borderBottom="1px dashed black":F.style.borderBottom="1px dotted black":F.style.borderBottom="1px solid black";D.style.borderBottom=F.style.borderBottom;a=A.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==
+1)),x.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=y)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),y.value=isNaN(a)?"":a+" pt";k.style.visibility="connector"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?k.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,
+null)?F.style.borderBottom="1px dashed black":F.style.borderBottom="1px dotted black":F.style.borderBottom="1px solid black";D.style.borderBottom=F.style.borderBottom;a=z.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.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(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";v.getElementsByTagName("div")[0].className="link"==e.style.shape?
"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==b.getSelectionCount()?(u.style.display="",q.style.display="none"):(u.style.display="none",q.style.display="");a=g(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill",
-"1"),E,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(A,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(E,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(E,100));if(f||document.activeElement!=W)a=parseInt(mxUtils.getValue(e.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),W.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),
-J.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt"});M=this.installInputHandler(W,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");H=this.installInputHandler(I,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0,-999,999," pt");O=this.installInputHandler(G,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(x,X);this.addKeyHandler(W,X);this.addKeyHandler(Q,X);this.addKeyHandler(I,X);this.addKeyHandler(J,X);this.addKeyHandler(G,X);b.getModel().addListener(mxEvent.CHANGE,X);this.listeners.push({destroy:function(){b.getModel().removeListener(X)}});X();return a};
+"1"),E,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(z,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(E,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(E,100));if(f||document.activeElement!=X)a=parseInt(mxUtils.getValue(e.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),X.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),
+J.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt"});M=this.installInputHandler(X,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");H=this.installInputHandler(I,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0,-999,999," pt");N=this.installInputHandler(G,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(x,W);this.addKeyHandler(X,W);this.addKeyHandler(Q,W);this.addKeyHandler(I,W);this.addKeyHandler(J,W);this.addKeyHandler(G,W);b.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){b.getModel().removeListener(W)}});W();return a};
StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var d=document.createElement("table");mxClient.IS_QUIRKS&&(d.style.fontSize="1em");d.style.width="100%";d.style.fontWeight="bold";d.style.paddingRight="20px";var b=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var g=document.createElement("td");g.style.padding="0px";g.style.width="50%";g.setAttribute("valign",
"top");var k=g.cloneNode(!0);k.style.paddingLeft="8px";e.appendChild(g);e.appendChild(k);b.appendChild(e);d.appendChild(b);a.appendChild(d);var l=g,m=0,n=mxUtils.bind(this,function(b,a,d){b=this.createCellOption(b,a,d);b.style.width="100%";l.appendChild(b);l=l==g?k:g;m++}),p=mxUtils.bind(this,function(b,d,c){f=this.format.getSelectionState();g.innerHTML="";k.innerHTML="";l=g;f.rounded&&n(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==f.style.shape&&n(mxResources.get("divider"),
"swimlaneLine",1);f.containsImage||n(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);f.glass&&n(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);f.comic&&n(mxResources.get("comic"),"comic",0);0==m&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){c.getModel().removeListener(p)}});p();return a};
@@ -3042,22 +3080,10 @@ Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,
Toolbar.prototype.createLabel=function(a,c){var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");f.className="geLabel";mxUtils.write(f,a);return f};
Toolbar.prototype.addMenuHandler=function(a,c,f,d){if(null!=f){var b=this.editorUi.editor.graph,e=null,g=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(k){if(g&&(null==a.enabled||a.enabled)){b.popupMenuHandler.hideMenu();e=new mxPopupMenu(f);e.div.className+=" geToolbarMenu";e.showDisabled=d;e.labels=c;e.autoExpand=!0;var l=mxUtils.getOffset(a);e.popup(l.x,l.y+a.offsetHeight,null,k);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}g=!0;mxEvent.consume(k)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){g=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};
-function Dialog(a,c,f,d,b,e,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);f+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(1,Math.round((document.body.scrollWidth-f-64)/2)),n=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
-l.style.width=f+"px";l.style.height=d+"px";l.style.left=m+"px";l.style.top=n+"px";l.style.zIndex=this.zIndex;null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.left="0px",this.bg.style.top="0px",this.bg.style.bottom="0px",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));b&&document.body.appendChild(this.bg);l.appendChild(c);
-document.body.appendChild(l);e&&(c=document.createElement("img"),c.setAttribute("src",Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("close")),c.className="geDialogClose",c.style.top=n+14+"px",c.style.left=m+f+38-k+"px",c.style.zIndex=this.zIndex,mxEvent.addListener(c,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(c),this.dialogImg=c,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.onDialogClose=
-g;this.container=l;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+
-"/clear.gif";
-Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
-"/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);this.container.parentNode.removeChild(this.container)};
var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=
-function(a,c,f,d){function b(){var b=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);b.style.marginBottom="8px";return b}function e(a,d,c,e){d=null!=d?d:12;var f=document.createElement("table");f.style.borderCollapse="collapse";f.setAttribute("cellspacing","0");f.style.marginBottom="20px";f.style.cellSpacing="0px";var l=document.createElement("tbody");f.appendChild(l);for(var n=a.length/d,p=0;p<n;p++){for(var v=document.createElement("tr"),q=0;q<d;q++)(function(b){var a=
-document.createElement("td");a.style.border="1px solid black";a.style.padding="0px";a.style.width="16px";a.style.height="16px";null==b&&(b=c);"none"==b?a.style.background="url('"+Dialog.prototype.noColorImage+"')":a.style.backgroundColor="#"+b;v.appendChild(a);null!=b&&(a.style.cursor="pointer",mxEvent.addListener(a,"click",function(){"none"==b?(k.fromString("ffffff"),g.value="none"):k.fromString(b)}))})(a[p*d+q]);l.appendChild(v)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
-a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",v.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();f.parentNode.replaceChild(b(),f)}));m.appendChild(f);return f}this.editorUi=a;var g=document.createElement("input");g.style.marginBottom="10px";
+function(a,c,f,d){function b(){var b=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);b.style.marginBottom="8px";return b}function e(a,d,c,e){d=null!=d?d:12;var f=document.createElement("table");f.style.borderCollapse="collapse";f.setAttribute("cellspacing","0");f.style.marginBottom="20px";f.style.cellSpacing="0px";var l=document.createElement("tbody");f.appendChild(l);for(var n=a.length/d,p=0;p<n;p++){for(var q=document.createElement("tr"),v=0;v<d;v++)(function(b){var a=
+document.createElement("td");a.style.border="1px solid black";a.style.padding="0px";a.style.width="16px";a.style.height="16px";null==b&&(b=c);"none"==b?a.style.background="url('"+Dialog.prototype.noColorImage+"')":a.style.backgroundColor="#"+b;q.appendChild(a);null!=b&&(a.style.cursor="pointer",mxEvent.addListener(a,"click",function(){"none"==b?(k.fromString("ffffff"),g.value="none"):k.fromString(b)}))})(a[p*d+v]);l.appendChild(q)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
+a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",q.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();f.parentNode.replaceChild(b(),f)}));m.appendChild(f);return f}this.editorUi=a;var g=document.createElement("input");g.style.marginBottom="10px";
g.style.width="216px";mxClient.IS_IE&&(g.style.marginTop="10px",document.body.appendChild(g));this.init=function(){mxClient.IS_TOUCH||g.focus()};var k=new jscolor.color(g);k.pickerOnfocus=!1;k.showPicker();var l=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";l.appendChild(jscolor.picker.box);var m=document.createElement("center");l.appendChild(g);
mxUtils.br(l);b();var n=e(this.presetColors);n.style.marginBottom="8px";n=e(this.defaultColors);n.style.marginBottom="16px";l.appendChild(m);n=document.createElement("div");n.style.textAlign="right";n.style.whiteSpace="nowrap";var p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});p.className="geBtn";a.editor.cancelFirst&&n.appendChild(p);var q=null!=f?f:this.createApplyFunction();f=mxUtils.button(mxResources.get("apply"),function(){var b=g.value;ColorDialog.addRecentColor(b,
12);"none"!=b&&"#"!=b.charAt(0)&&(b="#"+b);q(b);a.hideDialog()});f.className="geBtn gePrimaryBtn";n.appendChild(f);a.editor.cancelFirst||n.appendChild(p);null!=c&&("none"==c?(k.fromString("ffffff"),g.value="none"):k.fromString(c));l.appendChild(n);this.picker=k;this.colorInput=g;mxEvent.addListener(l,"keydown",function(b){27==b.keyCode&&(a.hideDialog(),null!=d&&d(),mxEvent.consume(b))});this.container=l};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
@@ -3065,44 +3091,19 @@ ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");c.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(f);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);f=document.createElement("a");f.setAttribute("href",
-"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";c.appendChild(f);this.container=c},PageSetupDialog=function(a){function c(){null==n||n==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=n,m.style.backgroundImage="")}function f(){null==
-t?(q.removeAttribute("title"),q.style.fontSize="",q.innerHTML=mxResources.get("change")+"..."):(q.setAttribute("title",t.src),q.style.fontSize="11px",q.innerHTML=t.src.substring(0,42)+"...")}var d=a.editor.graph,b,e,g=document.createElement("table");g.style.width="100%";g.style.height="100%";var k=document.createElement("tbody");b=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");b.appendChild(e);
-e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var l=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",d.pageFormat);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("background")+":");b.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="18px";
-m.style.height="18px";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var n=d.background;c();mxEvent.addListener(m,"click",function(b){a.pickColor(n||"none",function(b){n=b;c()});mxEvent.consume(b)});e.appendChild(m);mxUtils.write(e,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();e.appendChild(p);
-mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?d.getGridSize():b)});b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+":");b.appendChild(e);e=document.createElement("td");var q=document.createElement("a");q.style.textDecoration="underline";q.style.cursor="pointer";q.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(q,"click",function(b){a.showBackgroundImageDialog(function(b){t=
-b;f()});mxEvent.consume(b)});f();e.appendChild(q);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&e.appendChild(u);var v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=n&&a.setBackgroundColor(n);d.backgroundImage!==
-t&&a.setBackgroundImage(t);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(u);b.appendChild(e);k.appendChild(b);g.appendChild(k);this.container=g};
-PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function b(b,a,d){if(d||p!=document.activeElement&&q!=document.activeElement){b=!1;for(a=0;a<u.length;a++)d=u[a],y?"custom"==d.key&&(k.value=d.key,y=!1):null!=d.format&&(f.width==d.format.width&&f.height==d.format.height?(k.value=d.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,b=!0):f.width==d.format.height&&f.height==d.format.width&&(k.value=d.key,e.removeAttribute("checked"),
-e.defaultChecked=!1,e.checked=!1,g.setAttribute("checked","checked"),g.defaultChecked=!0,b=g.checked=!0));b?(l.style.display="",n.style.display="none"):(p.value=f.width,q.value=f.height,z.setAttribute("selected","selected"),e.setAttribute("checked","checked"),e.defaultChecked=!0,l.style.display="none",n.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var g=document.createElement("input");
-g.setAttribute("name",c);g.setAttribute("type","radio");g.setAttribute("value","landscape");var k=document.createElement("select");k.style.marginBottom="8px";k.style.width="202px";var l=document.createElement("div");l.style.marginLeft="4px";l.style.width="210px";l.style.height="24px";e.style.marginRight="6px";l.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));l.appendChild(c);g.style.marginLeft="10px";g.style.marginRight="6px";l.appendChild(g);
-var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));l.appendChild(m);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var p=document.createElement("input");p.setAttribute("size","6");p.setAttribute("value",f.width);n.appendChild(p);mxUtils.write(n," x ");var q=document.createElement("input");q.setAttribute("size","6");q.setAttribute("value",f.height);n.appendChild(q);mxUtils.write(n," pt");
-l.style.display="none";n.style.display="none";for(var t={},u=PageSetupDialog.getFormats(),v=0;v<u.length;v++){var x=u[v];t[x.key]=x;var z=document.createElement("option");z.setAttribute("value",x.key);mxUtils.write(z,x.title);k.appendChild(z)}var y=!1;b();a.appendChild(k);mxUtils.br(a);a.appendChild(l);a.appendChild(n);var B=f,A=function(){var b=t[k.value];null!=b.format?(p.value=b.format.width,q.value=b.format.height,n.style.display="none",l.style.display=""):(l.style.display="none",n.style.display=
-"");b=new mxRectangle(0,0,parseInt(p.value),parseInt(q.value));"custom"!=k.value&&g.checked&&(b=new mxRectangle(0,0,b.height,b.width));if(b.width!=B.width||b.height!=B.height)B=b,null!=d&&d(B)};mxEvent.addListener(c,"click",function(b){e.checked=!0;A();mxEvent.consume(b)});mxEvent.addListener(m,"click",function(b){g.checked=!0;A();mxEvent.consume(b)});mxEvent.addListener(p,"blur",A);mxEvent.addListener(p,"click",A);mxEvent.addListener(q,"blur",A);mxEvent.addListener(q,"click",A);mxEvent.addListener(g,
-"change",A);mxEvent.addListener(e,"change",A);mxEvent.addListener(k,"change",function(){y="custom"==k.value;A()});A();return{set:function(a){f=a;b(null,null,!0)},get:function(){return B},widthInput:p,heightInput:q}};
-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:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1652)},{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,584,826)},{key:"custom",title:mxResources.get("custom"),format:null}]};var PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(b){var a=k.checked||m.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,e=1/f.pageScale;if(a){var g=k.checked?1:parseInt(n.value);isNaN(g)||(e=mxUtils.getScaleForPageCount(g,f,c))}f.getGraphBounds();var l=g=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);e*=d;!a&&f.pageVisible?(d=f.getPageLayout(),g-=d.x*c.width,l-=d.y*c.height):
-a=!0;a=PrintDialog.createPrintPreview(f,e,c,0,g,l,a);a.open();b&&PrintDialog.printPreview(a)}var f=a.editor.graph,d,b,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");b=document.createElement("td");b.setAttribute("colspan","2");b.style.fontSize="10pt";b.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("fitPage"));
-b.appendChild(l);mxEvent.addListener(l,"click",function(b){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(b)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(b);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");b=document.createElement("td");b.style.fontSize="10pt";b.appendChild(m);l=document.createElement("span");mxUtils.write(l," "+mxResources.get("posterPrint")+":");b.appendChild(l);mxEvent.addListener(l,
-"click",function(b){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(b)});d.appendChild(b);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";b=document.createElement("td");b.style.fontSize="10pt";b.appendChild(n);mxUtils.write(b," "+mxResources.get("pages")+" (max)");d.appendChild(b);g.appendChild(d);mxEvent.addListener(m,"change",
-function(){m.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);b=document.createElement("td");mxUtils.write(b,mxResources.get("pageScale")+":");d.appendChild(b);b=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";b.appendChild(p);d.appendChild(b);g.appendChild(d);d=document.createElement("tr");b=document.createElement("td");b.colSpan=2;
-b.style.paddingTop="20px";b.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&b.appendChild(l);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});q.className="geBtn";b.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||
-b.appendChild(l);d.appendChild(b);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}};
-PrintDialog.createPrintPreview=function(a,c,f,d,b,e,g){c=new mxPrintPreview(a,c,f,d,b,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=g;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var k=c.writeHead;c.writeHead=function(b){k.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
-PrintDialog.previewEnabled=!0;
-var FilenameDialog=function(a,c,f,d,b,e,g,k,l,m){l=null!=l?l:!0;var n,p,q=document.createElement("table"),t=document.createElement("tbody");q.style.marginTop="8px";n=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace="nowrap";p.style.fontSize="10pt";p.style.width="120px";mxUtils.write(p,(b||mxResources.get("filename"))+":");n.appendChild(p);var u=document.createElement("input");u.setAttribute("value",c||"");u.style.marginLeft="4px";u.style.width="180px";var v=mxUtils.button(f,
-function(){if(null==e||e(u.value))l&&a.hideDialog(),d(u.value)});v.className="geBtn gePrimaryBtn";this.init=function(){if(null!=b||null==g)if(u.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=q.parentNode,d=null;mxEvent.addListener(a,"dragleave",function(b){null!=d&&(d.style.backgroundColor="",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(b){null==
-d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=u,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(u.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),v.click());b.stopPropagation();b.preventDefault()}))}};p=document.createElement("td");p.appendChild(u);n.appendChild(p);null==b&&null!=g||t.appendChild(n);
-null!=g&&(n=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(g),n.appendChild(p),t.appendChild(n));n=document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";p.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});c.className="geBtn";a.editor.cancelFirst&&p.appendChild(c);null!=k&&(f=mxUtils.button(mxResources.get("help"),function(){window.open(k)}),
-f.className="geBtn",p.appendChild(f));mxEvent.addListener(u,"keypress",function(b){13==b.keyCode&&v.click()});p.appendChild(v);a.editor.cancelFirst||p.appendChild(c);n.appendChild(p);t.appendChild(n);q.appendChild(t);this.container=q},TextareaDialog=function(a,c,f,d,b,e,g,k,l,m,n,p){g=null!=g?g:300;k=null!=k?k:120;m=null!=m?m:!1;var q,t,u=document.createElement("table"),v=document.createElement("tbody");q=document.createElement("tr");t=document.createElement("td");t.style.fontSize="10pt";t.style.width=
-"100px";mxUtils.write(t,c);q.appendChild(t);v.appendChild(q);q=document.createElement("tr");t=document.createElement("td");var x=document.createElement("textarea");n&&x.setAttribute("wrap","off");mxUtils.write(x,f||"");x.style.resize="none";x.style.width=g+"px";x.style.height=k+"px";this.textarea=x;this.init=function(){x.focus();x.scrollTop=0};t.appendChild(x);q.appendChild(t);v.appendChild(q);q=document.createElement("tr");t=document.createElement("td");t.style.paddingTop="14px";t.style.whiteSpace=
-"nowrap";t.setAttribute("align","right");c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});c.className="geBtn";a.editor.cancelFirst&&t.appendChild(c);null!=l&&l(t);null!=d&&(l=mxUtils.button(p||mxResources.get("apply"),function(){m||a.hideDialog();d(x.value)}),l.className="geBtn gePrimaryBtn",t.appendChild(l));a.editor.cancelFirst||t.appendChild(c);q.appendChild(t);v.appendChild(q);u.appendChild(v);this.container=u},EditDiagramDialog=function(a){var c=document.createElement("div");
-c.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="370px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",
-function(b){b.stopPropagation();b.preventDefault()},!1),f.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var d=new FileReader;d.onload=function(b){f.value=b.target.result};d.readAsText(b)}else f.value=a.extractGraphModelFromEvent(b)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);var b=document.createElement("select");b.style.width=
-"180px";b.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));b.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&b.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),
-b.appendChild(e));c.appendChild(b);e=mxUtils.button(mxResources.get("ok"),function(){var d=a.editor.graph.zapGremlins(mxUtils.trim(f.value)),c=null;if("new"==b.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(d,null),window.open(a.getUrl());else if("replace"==b.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(d).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==
-b.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(d),m=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,m);var n=m.getChildren(m.getChildAt(m.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(n));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(d);this.container=c};
-EditDiagramDialog.showNewWindowOption=!0;
+"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";c.appendChild(f);this.container=c},FilenameDialog=function(a,c,f,d,b,e,g,k,l,m){l=null!=l?l:!0;var n,p,q=document.createElement("table"),t=document.createElement("tbody");q.style.marginTop="8px";n=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace=
+"nowrap";p.style.fontSize="10pt";p.style.width="120px";mxUtils.write(p,(b||mxResources.get("filename"))+":");n.appendChild(p);var u=document.createElement("input");u.setAttribute("value",c||"");u.style.marginLeft="4px";u.style.width="180px";var v=mxUtils.button(f,function(){if(null==e||e(u.value))l&&a.hideDialog(),d(u.value)});v.className="geBtn gePrimaryBtn";this.init=function(){if(null!=b||null==g)if(u.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",
+!1,null),Graph.fileSupport){var a=q.parentNode,d=null;mxEvent.addListener(a,"dragleave",function(b){null!=d&&(d.style.backgroundColor="",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=u,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,
+"text/uri-list")&&(u.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),v.click());b.stopPropagation();b.preventDefault()}))}};p=document.createElement("td");p.appendChild(u);n.appendChild(p);null==b&&null!=g||t.appendChild(n);null!=g&&(n=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(g),n.appendChild(p),t.appendChild(n));n=document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";
+p.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});c.className="geBtn";a.editor.cancelFirst&&p.appendChild(c);null!=k&&(f=mxUtils.button(mxResources.get("help"),function(){window.open(k)}),f.className="geBtn",p.appendChild(f));mxEvent.addListener(u,"keypress",function(b){13==b.keyCode&&v.click()});p.appendChild(v);a.editor.cancelFirst||p.appendChild(c);n.appendChild(p);t.appendChild(n);q.appendChild(t);this.container=q},TextareaDialog=
+function(a,c,f,d,b,e,g,k,l,m,n,p){g=null!=g?g:300;k=null!=k?k:120;m=null!=m?m:!1;var q,t,u=document.createElement("table"),v=document.createElement("tbody");q=document.createElement("tr");t=document.createElement("td");t.style.fontSize="10pt";t.style.width="100px";mxUtils.write(t,c);q.appendChild(t);v.appendChild(q);q=document.createElement("tr");t=document.createElement("td");var x=document.createElement("textarea");n&&x.setAttribute("wrap","off");mxUtils.write(x,f||"");x.style.resize="none";x.style.width=
+g+"px";x.style.height=k+"px";this.textarea=x;this.init=function(){x.focus();x.scrollTop=0};t.appendChild(x);q.appendChild(t);v.appendChild(q);q=document.createElement("tr");t=document.createElement("td");t.style.paddingTop="14px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});c.className="geBtn";a.editor.cancelFirst&&t.appendChild(c);null!=l&&l(t);null!=d&&(l=mxUtils.button(p||mxResources.get("apply"),
+function(){m||a.hideDialog();d(x.value)}),l.className="geBtn gePrimaryBtn",t.appendChild(l));a.editor.cancelFirst||t.appendChild(c);q.appendChild(t);v.appendChild(q);u.appendChild(v);this.container=u},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize",
+"off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="370px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),f.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var d=new FileReader;d.onload=
+function(b){f.value=b.target.result};d.readAsText(b)}else f.value=a.extractGraphModelFromEvent(b)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);var b=document.createElement("select");b.style.width="180px";b.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));b.appendChild(e)}e=
+document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&b.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),b.appendChild(e));c.appendChild(b);e=mxUtils.button(mxResources.get("ok"),function(){var d=a.editor.graph.zapGremlins(mxUtils.trim(f.value)),c=null;if("new"==b.value)window.openFile=
+new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(d,null),window.open(a.getUrl());else if("replace"==b.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(d).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==b.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(d),m=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,m);var n=m.getChildren(m.getChildAt(m.getRoot(),
+0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(n));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(d);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
var ExportDialog=function(a){function c(){var b=n.value,a=b.lastIndexOf(".");n.value=0<a?b.substring(0,a+1)+p.value:b+"."+p.value;"xml"===p.value?(q.setAttribute("disabled","true"),t.setAttribute("disabled","true"),u.setAttribute("disabled","true"),x.setAttribute("disabled","true")):(q.removeAttribute("disabled"),t.removeAttribute("disabled"),u.removeAttribute("disabled"),x.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}
function f(){t.style.backgroundColor=t.value*u.value>MAX_AREA||0>=t.value?"red":"";u.style.backgroundColor=t.value*u.value>MAX_AREA||0>=u.value?"red":""}var d=a.editor.graph,b=d.getGraphBounds(),e=d.view.scale,g=Math.ceil(b.width/e),k=Math.ceil(b.height/e),l,e=document.createElement("table"),m=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");b=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";l.style.width="100px";mxUtils.write(l,
mxResources.get("filename")+":");b.appendChild(l);var n=document.createElement("input");n.setAttribute("value",a.editor.getOrCreateFilename());n.style.width="180px";l=document.createElement("td");l.appendChild(n);b.appendChild(l);m.appendChild(b);b=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("format")+":");b.appendChild(l);var p=document.createElement("select");p.style.width="180px";l=document.createElement("option");l.setAttribute("value",
@@ -3112,8 +3113,8 @@ q.setAttribute("type","number");q.setAttribute("value","100");q.style.width="180
l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("height")+":");b.appendChild(l);var u=document.createElement("input");u.setAttribute("value",k);u.style.width="180px";l=document.createElement("td");l.appendChild(u);b.appendChild(l);m.appendChild(b);b=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("background")+":");b.appendChild(l);var v=document.createElement("input");v.setAttribute("type",
"checkbox");v.checked=null==d.background||d.background==mxConstants.NONE;l=document.createElement("td");l.appendChild(v);mxUtils.write(l,mxResources.get("transparent"));b.appendChild(l);m.appendChild(b);b=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("borderWidth")+":");b.appendChild(l);var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("value",ExportDialog.lastBorderValue);x.style.width="180px";
l=document.createElement("td");l.appendChild(x);b.appendChild(l);m.appendChild(b);e.appendChild(m);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(q,"change",function(){var b=Math.max(0,parseFloat(q.value)||100)/100;q.value=parseFloat((100*b).toFixed(2));0<g?(t.value=Math.floor(g*b),u.value=Math.floor(k*b)):(q.value="100",t.value=g,u.value=k);f()});mxEvent.addListener(t,"change",function(){var b=parseInt(t.value)/g;0<b?(q.value=parseFloat((100*b).toFixed(2)),u.value=Math.floor(k*b)):(q.value=
-"100",t.value=g,u.value=k);f()});mxEvent.addListener(u,"change",function(){var b=parseInt(u.value)/k;0<b?(q.value=parseFloat((100*b).toFixed(2)),t.value=Math.floor(g*b)):(q.value="100",t.value=g,u.value=k);f()});b=document.createElement("tr");l=document.createElement("td");l.setAttribute("align","right");l.style.paddingTop="22px";l.colSpan=2;var z=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(q.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=
-n.value,c=p.value,e=Math.max(0,parseFloat(q.value)||100)/100,f=Math.max(0,parseInt(x.value)),g=d.background;if(("svg"==c||"png"==c)&&v.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,e,f)}}));z.className="geBtn gePrimaryBtn";var y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});y.className="geBtn";a.editor.cancelFirst?(l.appendChild(y),l.appendChild(z)):(l.appendChild(z),l.appendChild(y));b.appendChild(l);
+"100",t.value=g,u.value=k);f()});mxEvent.addListener(u,"change",function(){var b=parseInt(u.value)/k;0<b?(q.value=parseFloat((100*b).toFixed(2)),t.value=Math.floor(g*b)):(q.value="100",t.value=g,u.value=k);f()});b=document.createElement("tr");l=document.createElement("td");l.setAttribute("align","right");l.style.paddingTop="22px";l.colSpan=2;var y=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(q.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=
+n.value,c=p.value,e=Math.max(0,parseFloat(q.value)||100)/100,f=Math.max(0,parseInt(x.value)),g=d.background;if(("svg"==c||"png"==c)&&v.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,e,f)}}));y.className="geBtn gePrimaryBtn";var A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});A.className="geBtn";a.editor.cancelFirst?(l.appendChild(A),l.appendChild(y)):(l.appendChild(y),l.appendChild(A));b.appendChild(l);
m.appendChild(b);e.appendChild(m);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,c,f,d,b,e){var g=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(g.getSvg(d,b,e)),c,f);else{var k=g.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((e/b-k.x)/g.view.scale),Math.floor((e/b-k.y)/g.view.scale));l.scale(b/g.view.scale);(new mxImageExport).drawState(g.getView().getState(g.model.root),
l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(k.width*b/g.view.scale+2*e);b=Math.ceil(k.height*b/g.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&l*b<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(c)+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+b+"&"+m)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
@@ -3124,9 +3125,9 @@ b){m[d]=null;k.table.deleteRow(a);break}null!=m[d]&&a++}}}(a);mxEvent.addListene
g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.marginTop="6px";var v=document.createElement("input");v.setAttribute("placeholder",mxResources.get("enterPropertyName"));v.setAttribute("type","text");v.setAttribute("size",mxClient.IS_QUIRKS?"18":"22");v.style.marginLeft="2px";g.appendChild(v);d.appendChild(g);var x=mxUtils.button(mxResources.get("addProperty"),function(){var b=v.value;if(0<b.length&&"label"!=b&&"placeholders"!=b)try{var a=mxUtils.indexOf(l,b);if(0<=a&&null!=m[a])m[a].focus();
else{e.cloneNode(!1).setAttribute(b,"");0<=a&&(l.splice(a,1),m.splice(a,1));l.push(b);var d=k.addTextarea(b+":","",2);d.style.width="100%";m.push(d);p(d,b);d.focus()}v.value=""}catch(E){mxUtils.alert(E)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<m.length?m[0].focus():v.focus()};x.setAttribute("disabled","disabled");x.style.marginLeft="10px";x.style.width="144px";g.appendChild(x);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});
g.className="geBtn";q=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var d=!1,f=0;f<l.length;f++)null==m[f]?e.removeAttribute(l[f]):(e.setAttribute(l[f],m[f].value),d=d||"placeholder"==l[f]&&"1"==e.getAttribute("placeholders"));d&&e.removeAttribute("label");b.getModel().setValue(c,e)}catch(C){mxUtils.alert(C)}});q.className="geBtn gePrimaryBtn";mxEvent.addListener(v,"keyup",f);mxEvent.addListener(v,"change",f);t=document.createElement("div");
-t.style.marginTop="18px";t.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){u=document.createElement("span");u.style.marginRight="10px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);mxEvent.addListener(z,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders",
-"1")});u.appendChild(z);mxUtils.write(u,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){z=document.createElement("a");z.setAttribute("href",EditDataDialog.placeholderHelpLink);z.setAttribute("title",mxResources.get("help"));z.setAttribute("target","_blank");z.style.marginLeft="10px";z.style.cursor="help";var y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop="-4px";y.setAttribute("src",Editor.helpImage);z.appendChild(y);
-u.appendChild(z)}t.appendChild(u)}a.editor.cancelFirst?(t.appendChild(g),t.appendChild(q)):(t.appendChild(q),t.appendChild(g));d.appendChild(t);this.container=d};EditDataDialog.placeholderHelpLink=null;
+t.style.marginTop="18px";t.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){u=document.createElement("span");u.style.marginRight="10px";var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(y.setAttribute("checked","checked"),y.defaultChecked=!0);mxEvent.addListener(y,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders",
+"1")});u.appendChild(y);mxUtils.write(u,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){y=document.createElement("a");y.setAttribute("href",EditDataDialog.placeholderHelpLink);y.setAttribute("title",mxResources.get("help"));y.setAttribute("target","_blank");y.style.marginLeft="10px";y.style.cursor="help";var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("valign","middle");A.style.marginTop="-4px";A.setAttribute("src",Editor.helpImage);y.appendChild(A);
+u.appendChild(y)}t.appendChild(u)}a.editor.cancelFirst?(t.appendChild(g),t.appendChild(q)):(t.appendChild(q),t.appendChild(g));d.appendChild(t);this.container=d};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,c,f,d){var b=document.createElement("div");mxUtils.write(b,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var g=document.createElement("input");g.setAttribute("value",c);g.setAttribute("placeholder","http://www.example.com/");g.setAttribute("type",
"text");g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.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(){g.value="";g.focus()});e.appendChild(g);e.appendChild(c);b.appendChild(e);this.init=function(){g.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(g.value))});
@@ -3144,14 +3145,14 @@ m.style.marginLeft="4px";m.style.marginRight="6px";m.style.marginTop="4px";l.app
document.createElement("div"),a.style.display="block",a.style.textAlign="right",a.style.whiteSpace="nowrap",a.style.position="absolute",a.style.right="6px",a.style.top="6px",0<b&&(l=document.createElement("a"),l.setAttribute("title",mxResources.get("toBack")),l.className="geButton",l.style.cssFloat="none",l.innerHTML="&#9660;",l.style.width="14px",l.style.height="14px",l.style.fontSize="14px",l.style.margin="0px",l.style.marginTop="-1px",a.appendChild(l),mxEvent.addListener(l,"click",function(a){k.isEnabled()&&
k.addCell(d,k.model.root,b-1);mxEvent.consume(a)})),0<=b&&b<t-1&&(l=document.createElement("a"),l.setAttribute("title",mxResources.get("toFront")),l.className="geButton",l.style.cssFloat="none",l.innerHTML="&#9650;",l.style.width="14px",l.style.height="14px",l.style.fontSize="14px",l.style.margin="0px",l.style.marginTop="-1px",a.appendChild(l),mxEvent.addListener(l,"click",function(a){k.isEnabled()&&k.addCell(d,k.model.root,b+1);mxEvent.consume(a)})),f.appendChild(a);mxClient.IS_SVG&&(!mxClient.IS_IE||
10<=document.documentMode)&&(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(b){var a=mxEvent.getSource(b).nodeName;"INPUT"!=a&&"IMG"!=a&&(e(d),mxEvent.consume(b))});k.getDefaultParent()==d?(f.style.background="#e6eff8",f.style.fontWeight="bold",u=d):mxEvent.addListener(f,"click",function(b){k.isEnabled()&&(k.setDefaultParent(c),k.view.setCurrentRoot(null),g())});n.appendChild(f)}t=k.model.getChildCount(k.model.root);n.innerHTML="";for(var a=t-1;0<=
-a;a--)mxUtils.bind(this,function(d){b(a,d.value||mxResources.get("background"),d,d)})(k.model.getChildAt(k.model.root,a));x.setAttribute("title",mxResources.get("removeIt",[u.value||mxResources.get("background")]));z.setAttribute("title",mxResources.get("moveSelectionTo",[u.value||mxResources.get("background")]));B.setAttribute("title",mxResources.get("duplicateIt",[u.value||mxResources.get("background")]));y.setAttribute("title",mxResources.get("renameIt",[u.value||mxResources.get("background")]));
-k.isSelectionEmpty()&&(z.className="geButton mxDisabled")}var k=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background="whiteSmoke";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";var m=EditorUi.compactUi?"26px":"30px",n=document.createElement("div");n.style.backgroundColor="#e5e5e5";n.style.position="absolute";n.style.overflow="auto";n.style.left="0px";n.style.right="0px";n.style.top="0px";n.style.bottom=
+a;a--)mxUtils.bind(this,function(d){b(a,d.value||mxResources.get("background"),d,d)})(k.model.getChildAt(k.model.root,a));x.setAttribute("title",mxResources.get("removeIt",[u.value||mxResources.get("background")]));y.setAttribute("title",mxResources.get("moveSelectionTo",[u.value||mxResources.get("background")]));B.setAttribute("title",mxResources.get("duplicateIt",[u.value||mxResources.get("background")]));A.setAttribute("title",mxResources.get("renameIt",[u.value||mxResources.get("background")]));
+k.isSelectionEmpty()&&(y.className="geButton mxDisabled")}var k=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background="whiteSmoke";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";var m=EditorUi.compactUi?"26px":"30px",n=document.createElement("div");n.style.backgroundColor="#e5e5e5";n.style.position="absolute";n.style.overflow="auto";n.style.left="0px";n.style.right="0px";n.style.top="0px";n.style.bottom=
parseInt(m)+7+"px";l.appendChild(n);var p=null,q=null;mxEvent.addListener(l,"dragover",function(b){b.dataTransfer.dropEffect="move";q=0;b.stopPropagation();b.preventDefault()});mxEvent.addListener(l,"drop",function(b){b.stopPropagation();b.preventDefault()});var t=null,u=null,v=document.createElement("div");v.className="geToolbarContainer";v.style.position="absolute";v.style.bottom="0px";v.style.left="0px";v.style.right="0px";v.style.height=m;v.style.overflow="hidden";v.style.padding=EditorUi.compactUi?
"4px 0px 3px 0px":"1px";v.style.backgroundColor="whiteSmoke";v.style.borderWidth="1px 0px 0px 0px";v.style.borderColor="#c3c3c3";v.style.borderStyle="solid";v.style.display="block";v.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(v.style.filter="none");m=document.createElement("a");m.className="geButton";mxClient.IS_QUIRKS&&(m.style.filter="none");var x=m.cloneNode();x.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(x,"click",function(b){if(k.isEnabled()){k.model.beginUpdate();
-try{var a=k.model.root.getIndex(u);k.removeCells([u],!1);0==k.model.getChildCount(k.model.root)?(k.model.add(k.model.root,new mxCell),k.setDefaultParent(null)):0<a&&a<=k.model.getChildCount(k.model.root)?k.setDefaultParent(k.model.getChildAt(k.model.root,a-1)):k.setDefaultParent(null)}finally{k.model.endUpdate()}}mxEvent.consume(b)});k.isEnabled()||(x.className="geButton mxDisabled");v.appendChild(x);var z=m.cloneNode();z.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
-mxEvent.addListener(z,"click",function(b){k.isEnabled()&&!k.isSelectionEmpty()&&k.moveCells(k.getSelectionCells(),0,0,!1,u)});v.appendChild(z);var y=m.cloneNode();y.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';y.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(y,"click",function(b){k.isEnabled()&&e(u);mxEvent.consume(b)});k.isEnabled()||(y.className="geButton mxDisabled");v.appendChild(y);var B=m.cloneNode();B.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
+try{var a=k.model.root.getIndex(u);k.removeCells([u],!1);0==k.model.getChildCount(k.model.root)?(k.model.add(k.model.root,new mxCell),k.setDefaultParent(null)):0<a&&a<=k.model.getChildCount(k.model.root)?k.setDefaultParent(k.model.getChildAt(k.model.root,a-1)):k.setDefaultParent(null)}finally{k.model.endUpdate()}}mxEvent.consume(b)});k.isEnabled()||(x.className="geButton mxDisabled");v.appendChild(x);var y=m.cloneNode();y.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
+mxEvent.addListener(y,"click",function(b){k.isEnabled()&&!k.isSelectionEmpty()&&k.moveCells(k.getSelectionCells(),0,0,!1,u)});v.appendChild(y);var A=m.cloneNode();A.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';A.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(A,"click",function(b){k.isEnabled()&&e(u);mxEvent.consume(b)});k.isEnabled()||(A.className="geButton mxDisabled");v.appendChild(A);var B=m.cloneNode();B.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
mxEvent.addListener(B,"click",function(b){if(k.isEnabled()){b=null;k.model.beginUpdate();try{b=k.cloneCells([u])[0],b.value=mxResources.get("untitledLayer"),b.setVisible(!0),b=k.addCell(b,k.model.root),k.setDefaultParent(b)}finally{k.model.endUpdate()}null==b||k.isCellLocked(b)||k.selectAll(b)}});k.isEnabled()||(B.className="geButton mxDisabled");v.appendChild(B);m=m.cloneNode();m.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';m.setAttribute("title",mxResources.get("addLayer"));
-mxEvent.addListener(m,"click",function(b){if(k.isEnabled()){k.model.beginUpdate();try{var a=k.addCell(new mxCell(mxResources.get("untitledLayer")),k.model.root);k.setDefaultParent(a)}finally{k.model.endUpdate()}}mxEvent.consume(b)});k.isEnabled()||(m.className="geButton mxDisabled");v.appendChild(m);l.appendChild(v);g();k.model.addListener(mxEvent.CHANGE,function(){g()});k.selectionModel.addListener(mxEvent.CHANGE,function(){k.isSelectionEmpty()?z.className="geButton mxDisabled":z.className="geButton"});
+mxEvent.addListener(m,"click",function(b){if(k.isEnabled()){k.model.beginUpdate();try{var a=k.addCell(new mxCell(mxResources.get("untitledLayer")),k.model.root);k.setDefaultParent(a)}finally{k.model.endUpdate()}}mxEvent.consume(b)});k.isEnabled()||(m.className="geButton mxDisabled");v.appendChild(m);l.appendChild(v);g();k.model.addListener(mxEvent.CHANGE,function(){g()});k.selectionModel.addListener(mxEvent.CHANGE,function(){k.isSelectionEmpty()?y.className="geButton mxDisabled":y.className="geButton"});
this.window=new mxWindow(mxResources.get("layers"),l,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=g;this.window.setLocation=function(b,a){var d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));a=Math.max(0,
Math.min(a,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==a||mxWindow.prototype.setLocation.apply(this,arguments)};mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){var b=this.window.getX(),a=this.window.getY();this.window.setLocation(b,a)}))};
(function(){Sidebar.prototype.tagIndex="vV1bV+M6sv41rDP7gax0oHufeYQEaGYamk1o+ryxFFtJNNiWt2yTpn/9UVVJtpP4Il+YtbqJnfj7VNalVJJKpfDXjWLxdsKUkrvkZPpPvNCfR/8uwr1HJ5c8Sk9m0298DR8XBsaiTcB9fZFmKnLleBSb7WCSH3GJIYubaQ455iwIZAY0C5mtAl6iSndS3+3Yu0umFDx/ZcwvsaxlpjrQbPmbklEJH8nU2+LLJGITsUD/JNqzZi6UlwVMlYg8/VUgoo2LGP/KwvhUFGLMpp/0c4rHAbzFinmvkNWRL/Fb/HCnmvWlMjWORf5hqUuVbuVGQvY41p17k62z6RKztSyizitTDA5ZNai4lwGPfK6OW1PyKqIIKCLbLJNAhK5kT1hzf2oZKhh9quf11PW8P4UPDeSJiYD7A6V9UmIv49Kt4tw9545fcTb9KpX4LaMUa8G2fNOL7pmrVHiIfysuG6h+Z4pPLjyPJ4mGz3XiSgIk4V6mRArv9crfq76o48pSGbJUYE1k+kZ/bLhu1dN/BqA5I2rOnoS/64Al2waipZaf508bmuZXgb+QIYF+fZBAK5SQVJJY6+wwgjlxzJluUwdyW4l9lrIVS+Bnf9VOdcfUK0/jgHmACPEOVQlwJlsZOwm0XPwbHpfrdMfwC5+/8UDGIXUqrwI4E0/xna+ELn/XF11mK40SsckcT/cKoLxjHnniuP7UkPzkq0SkHN8qANQmkCvehr7UyjQDtbjk6k1g7tjk9Scq2iSV8Y5p1QctToS8gUykl5kHWQtVGdv9Uus2ZF3RD+2N4VL8fmLBayFSUpKpDTyHRof1DN9Edw66aAQ2Qp9jj+iLONANBPInY4pFKacq5vEIa1PMVSjSSm6UYS+nnJvFAda09bXYZIqaxGx6LbCp+dLLsD4BPTzRkVpfPegyZRtecK7kL5e8oxI7lqMdGMZZitU9lJFIpcJ8TnRzO9bLR1hdAth6FjyANgPa9J5rO0q9lsrdNvuyKqgnXdQoh9rnlYwvdR5V1FrMudhkaAvNlX4VFSuRUH0XgU+CrrJERKDgW/Ddcx4RZB11QN2I9Gu2sm+rM5kBSnqppKuNSBvxXxe3UYJWeL0ergZyFqRbqBNb3Wawim856pgt/uIABl1OdYzy1hIZQ7dNgPcYjZJnGEdwT5r6dsciXbyqg575xuIUOw2vqPttmDtdBagWhQzVOrefEfYivBktV1Q94q2M4DOVmbdtTZNQe7o0yfVXA9UhTxakApQD86B56/49S7egWvMevWSfmH4jZr65auB9X/71DRp/UY2Sv4PmenVAcV+2LLRBl62wStPQqr1UDuBPMhbeCdgt+/ZLJeEB1XdduTSPrpc6v9+TlIf64jakMpeQ9VumQFVr3YiV3vcb+R7kjqvllgdBL7X8uHjAah5KI1N3iiWMd7IAq7fp+r3jMq3CgTXTL0ldOzE9xSrSqX6eur3LLMGhNM+wmv8NFz0IHnlVt+UExcqT5MPNslmXYDOjupXsm3vNSRw2D6cO7QClRcEvyFQ0HNWqrpZo+R55Fe0yoa8V9969oME0JKJHHuthN2nuQ6ZSHVmLRqpUq3y0WZ8YtiN3M2yplRc1R5124FQ7NGIpwjgoW8ZtoCcghxcJrdJ2UtY/IoHm6lrgSNnYIt9X/+EekGVriQpJ8NZa8yPBJrTNQgbPxlzSC9Ate9NZr+rRz18XJ0ZXVSip6uepksCH0W2Edlfjz0IXKk5V3elhn8B+6S08aTUpW2m0EuIspYq/zq+qWN+qZzQOeAvjNMqv2nLo58Vifn2DucM2kUxSUhPdtaMd5M2mNzziCtWJHefViXNMAS1RYtLVY8QmUNIFpcVBe8umRk2U2qs7MmmFbhCqK5rwJucwApICxxRLquc4wVYtbhn55RiZiLqRUxn4v8dAbuzjNugliyJsq3qEUzfNWn5+ThbbhsuQp6phfmkPpCSOPuIgw1n76iZdRiyOlHEkcUgds/jQ2D2AXjcP1SoxX40Vnw8DAm2aI8frsVVcBt5J7EIjx9y+l2iahSucY1tLtRK+X6FOj5Hfi9li3e8ogcsFUEGODfdK/DLU2QhKBs0xD6Xesjh+bwWaKiwwQ2KsZW2QDNh91Gn6b1CZOQeYJ4HWlh2P4SdMk7XhfjKUy9Tela3NjZj/O6FJJUiHRR4PsHrVFEiBlTJNUn05aReyGndXO+wK86FZM0PWuV81DHEID5QmAmIlPboKdTcf1KWscZMLH+epvQ7ZDLBLm5hWolnAC3OpyfQp4b9JKiG7KlS32leBMvOtqkJinL/f4svUcujhOHW1RuAtmNOt8uZjDoMyCksbYjQ8b9RcSJBb8052ZQmJ5lYhbtfa4bGVLqkU5znpEmrn35mIK62CI9xkfgmrbXlpCciFleKMioB6jFgeFno9z2z669N0HLZZnVSwUtqNp0mqjmxntVLhilI3Ji3X57HozusEMyZMF6IGuTqw3c0p/z/rP1/OLuCVH6BOi0hYW7rDm7vwn7vwV79BLf2XM0xj+mHylxMY9wUkzHX+pmXnnYBlGPsK+S+6O6VfushdxXs+Ei+MXlGXYLGeT3W2VOeCg3LbJ4SXn43FdjYjGUfge1C6u/HMJKIm7034yBPhU/c3z5SyayOmZ5pBASmvuTt05DrvxLXMFC4p7b3oJ6Co6xHcafCt6lS4Ow22inqV606EOVOrIyt5nmDZkEYH59MwnOW91apyvrSVYwQK0ErDaT6P8DZfUDcO5/mzIwcX0J3y8rKcHj7xjbKLFjED4/DY3Yvg60BKFQdovQXsvX494eDxySVq1YV1mlnhIu46U5EwHYIjw1KYUWY9tgYu5atH025dofMtE6oPTsYCdZzPzeqSG4rmRRO5Zl3zaP74BEb380l5Dq80r1chRwXLgievONmqaIBiR0edRNknoQXZfkRKj9jsSmSCA4EdU76i+bYaqgqeq4Dr4QbmA088FphrFxGu9cMj5Os1XGmebyyERlg9CVENrVpcjWHEGDLzV7diSW5AVhiY+UzSwr2ogvb7ek0dn63iXmtVr2B5EAznKvT3OCoVUZKq6unbKrT+QxNdCqbD9Q+7poF8CahAc3VuX48swu4NXDFZHAcC5ls6Ymd9sHytxAaWQ7HOdIUvSR14Rjt0KqAn0+58njT3DocQyiUD65Gk8cMYgD8biD8fiP/cFy8FrXdp1aFo6SZgqH9AdWiVliopj307D2l+shS151xKWnLewReevXOR5OeeGgh6KJJKWl9foLctLNY4a1J49NH6ydTDbixspxUSToPD9QnqJ/Jt4X9nhRubYDqdypWqnGJyEUUytS4NnygDjIrS5du+9lzDNBvCNJdBQG55W21ZbwJW4RBVjTxc/U7yVdx2aO2ichMKvV1OS9gQvnBapitIHlhsZgVjpxnyQ/yyKHWzuAo2Re1iwxEcVslN6fMgEHFiZyKqxzN1+FlvvFRkBpPodYVWg87C0DitZJFnXYwyqPY1q1eHDE+6f07WvDxvreoWQggbcBa9hLqrojWrNxZkoBS18uIsbJS7jJxci0gktE3gRkof5t9TiSNwnQVhX4EmN7h0xc1Y1c/sWNW46JDM2Kp4c7vaY/2epYkouTziHHQhaJJBx91UX/fYnrVVQ470ZgrcrJe4YC8EKk0Q5U/IIrLMlF1Hpd+qNa42xJQUUCtCid7MTerZPEyOp7/Mmv6Fzc1LnKH329aU2knA8I18bXpjgx2ZcDb9uTWu3tVVqCv1ULqlriXpWPlYSTZGfrYSf1BG9KJ9AN9MNL1Ltdt4EzUOwSzBX5nwXnUPLXEzQH6xIr8GvF0drmw1klBf0JNoaZ9LDkAHfI0cWlHQ+HohEjBZQcde6145Ic9+10rRyKPrgymjDoVVMD7gAL6nOBbcSwZtxJtphxMz+dAwIs1BuuauBQ9w46O+PgE7iW7bkOAOqkXW9QN1fBdJ96BgIWBOtWfYLsEGEbLfaA/sOFqDhWcz2yV1uInuZl7so7RnYsmZwuGldetL7BcN6dfzwPaga/035CnzyebpT3xlfBTMRxfo8moJSVqfRevtUHh9O9Lc79Ec7N/qwzab0lvNpvcHZKMm8vXp6eGj07Be4qOx/rWX2dZ1uQ/NbFrsMxiJ8C+LHkz387pMA3N2ZqjbhwmWsjzhk6E6GqfxPOxNaaYaXrSyezEemWDeXs1pIMXA97OkGnpSaQvj7raOMMwdaEVYGnJ1IEe99tPs+TtOw+4G7Cf5ApZe0Ti6jZLUzAoeJ0JO4cXQXxQPd03xypDrFB8q0xLH+z9duRvfYTBrUi3uQVZ0ob973KPUwy89TM8qZmad6aC66CEjNpqRib8urpcO/Fvmk7OaL/RoXaw0H24aJGs5oa04zkk/P8z1w2/G4Rtc9cSb2U96XKzOjKUJgNn0RvPRpvXxk7mFdYII9+B+ZDKP0kyojk/9/HCPs8DaKrZTPx+VyMAcat79WPv4ZPEesVAuwE3Ex8s+WN0HpKa2j8WTlIlYib0r4y21uCFCAcWePMK24m48+XpQV1lMr2GjEJTUsPmmOwuYpX5XsslGySzGTRBw0eENHhdgViqdGDQjVjsMaGYwPXapoxvOmJPBnjD0CX7kcaAN6LHZl/rCX72PQnsHf2gj26iZkW+CHT2bvyvm4cremNS0HQ6VV24jd8aCe4weDUZdSHQNke+wAoMaPcRN23BLw/BrqfK4J3nYgNJ3o1BjhfJePzaJJ64zZL8HGikVa9I3GPL9KCHgi9koPQr17cWdfp62Q+KecubZ7RL5Q/2ZtbS+f4qZ+XFJLJ+Wg/gjGZ2alvmSxHqku4bNVVJl2Cuu4aK9zST+K064+hjIxQauwRnkPHDN9J+vewEfjhkm95zWsNOoNoRLGUJLfZgtHsX3ePFNdA9T25WkCCe2epv7MVhBs+yiQGKvsrADggO9MGp6Vz76yXyT3pH+GTWdJa5E0rLoR73Y1SXU2sI8WRVBgGrdztxYtfwRi5OtTD8sgWcZZCH/APoleObk/VSxlO0wH9TGC7EDTGSkD05gNt0JDKBCO8qTthSl3XjeN93B6Xgi8eTERtIBolJUnfpafgCbXCpt9eCLkwcgOmM067FDCrvbGjIzl6Azy93ix4l1JtmBUwXSZJFIK9lqeZYhw/W4y2I/4VZmSbMNRSTWEyrBcov1S8VbrliQTG4vode60zbZWjEK9VF4TaXGTxG8w8ilKvYGJCIiCCZzsTyfTvfTib2hL/BkJB2JtNYXtSffXcnnrERJDmlF7u67sxYJuqcjPCVtfJ/ih0E1BOfFSkLXiduTG6wyndvkAkjhI8YT3E5YeeMS5165IxEuPesfNhZhbPcejUWYRWaVpCjwkdrGMovB3TPnGok2j8aylwO0Tt6X0u5JGU3IH4eNawjZsx51oMuZ1uOKjVf2FAXkEqKfjlmlaitTTW9TxY1xUwPLHkqIWpVMPk1vrsC3Yy6vTnCnfdYy0dBMd/bpT9hV9Y8FyfVHaWkij90amKpbuumd3P9RcriV4qMTKwIx5rtB72x+Dc64a6H4jmyWYpe9oYcX3C3v/hgjnSPyMThtJLfx87wIKpTneSkRnTHPy/nZdDr9o2uCvs5vCNSH8+fmugtsAmPZoIQMZFukGWLYZit6xQ0trEATnF6yhMNWLQrNt82aV0rqiObw/WCWYWhreA9jOVx62jQuQh2HdTpIINR/J//m71DY+6GhGxGPD0v9T/+s4jqH4SNMZRRJJ2S+pudpJWO3Bbm9bgWj9Hlo+hEwcXXloCCJD8bgzT0lW2U7YvoqZZrbzeazO0sedzMP7X37UJLP44FLa6ri9TkFRfMrFsNcGJZy3fn98kgm1q+7DaDQ1oZqouwycRukFD+0dNmOgmiRtj46JoQQiFoc6qE3zdklpmeydmfxSwdGCOeWi9Gw3aQOW5ZhXeZyJcFB346vcmAIX5xYT8lmDuyBqGnboA9tmJ3uIAKaf9iJtahB3CBCP+hRwLIJW0E0JS+dLC7A6PXFRlDIfaZNaknR6SMIn18Rr6eBjIcZBGvTFR4mWHSF/dUSlreKRZcDJbvSbSZu26NUxXCX/Tq1suxL0ixZG+kRXTcGE5zWRDC7CCE+DO4KDeMAIk6Owzgbxvh0YaSSJW49VoO9PLpOwK4Xs4BZk4gD/exj6c8+ih62RNkVwgcTBi6pXQM64vFYzDxhbML8pjt6Ms+xVFSZcxOpIZmNQQLZTk/J4J2m/is4OxDCXtqsObZnO8nnMaS6M60eHRlLXDC+L5KC7gz8SzjpzzCkwIhcG5cUOvDj0nzA2NZ5mrFMhHOavtAWCg1TyDPGCWXy9DTk3pZF+NXslE5iWeYRi3Z1zj4udN9k5if53Flx1ZfvIUu25XHePfR8EazqB3ioEYZ7aNjY2JH9+z67VkgNe3SbuSkeNo1MtR4aXfYK/r7SC+6df/pzcjE/vZgTY25F5KZFR6JFLVFhtrjzLcYkw7ganTvbEno2vRQ0xrddVV+2y8JYWlsDqiveRATthV9cHGRshU3pTlZRfQbyHdWigq/G1G2hFOs1V/nu8GFV4Sry1HuMq/KR10EJG/hXMaTkv8m+6BddDMLDWRX0jWQVjqp1aLTFyBSy152xk1uLNIY0xZQ5cjPownM2Es/nITy0c16rX25fTSgzMz+Qa9aLy8bXodKqjbbTjgelx7UoRveGcenSsf3t1zm8q6t7LfAJHKiw1Zkh6dQJ8F/5ZnzmzKEKTpQwu8YD2B2viSbXWWID2egmMogDC4tz50ZVSYKjoVUiA+7eOiuJzgdJcxsEGSzYmYNQLrMA5kOE/RZYbYAq/FzRA53SwEBXlPWWS5ST7S61YZyNyGjOTj3MAGI7zo8++XDPcYhq4n61JjGE3lTSEZKQyZqnCZQdXZ7AWRENoTkqsJMFLeXAvD4sQH1fXl/Bqsf9yd4wDOze6DDgd09q2MxWGm31os7JbucjCbvPOKqMsIaAMfx1BX4dU9SHA+KhEt+fWlipuD6dNAzIezHORmc8G53xfHTGz6MzfhnC+FBX1rUTIb0YZ6Mzno3OeD464+fRGb/0Z4Qi6Ns/zEbXCTWMA3RCDeMAnVDDOEAn1DAO0Ak1jAN0wmx0nVDDOEAn1DAO0Ak1jAN0Qg3jAJ1Qw9hHJ8g4lS9mPjMSXjL5E9dvN+Yw6EUeOjfhb7VHDPVlzX35Fw+lFHzuiZD8KY7PCXJK7Z817xCJWkeBvqT7r2ASGP4G364WB6MwHorUnjl4vMjQgXQ2MilQnTIvRdcXjPc9h+AMiUfhRwJzTFTu+QVT7DhbezDJ55Tad/3FqSezmDzI4Pfirl+5IiWuboqEZtDgkb0v+hE/bGUqbbbGcFOdzbV8L3p0iAGhcAy6vxzbYe01DryXgPk+V3BMrC6g71kaZzaqZtv5sk5Es95EI8jSWwrYY/GS6DZglrWlccEpfTGEa3Lz9L1oDu0Nwcy/pRmG8pfrNdxs35Wphc7J3t7MbT9tzwnAtAw/+gWl5rsSf/f3MwnNPjyhe3S7u725LN4ryYL91FYilnTAV2XT7ZfW7L+Y1tl/Ma3zj03r4f7hv1Zee2l9cHntpfXB5bWX1geXF6goKqgO/XX3BGYfmMCt9cLDLWhV2qaeUXHKOvT05N16/URsdIf8kuRxh+mqH3yCK7ZLy8BgLdFMAXvm5KMepIsSqTkdAJfLx2SdfQjr2Uiszxhs+00GaVvs7gYOXN8dzDHrTpJuYZ8W2JQvFDIXHY2azs9woCDr1HhwW+O00qG7ki9XN0md8nHF701b/KtyOuk/rpNULbSzEWgfqqXtOuxuoewzI7JjbxzWqNGP2Vw3YoVM/pyAEsUlaa/WSfzw6ckFNidP8TZnhTIGA6tgTEaMZJCKkCL4hCLym5atSxyXFLNG8RgdqpwxO7NbVumqLzPS8jtRcRprNQGMjpMtuvWs5PFB2pUgakjMRJPp9pZSvmJSsulU4AoYiFZEJoBYvY3ui2WsEnxtTtpKpQyqXrMGOmcBj3wTJ929Osy3GCbAF4mXJUn9BoVj4H79sTnsAJShblEYVsMXzWPEPRQaKTQuxKkSc+yxHoynouKMgkoSDHf2H/bGXJM1p000B+arBHLjo6CrnGzRHWVYcSiIJytO826BYYdUUMQsafIk2SPY4YyfDXWDhiB3rbZX9ujr2fQfV2GcvuPuyzxusOLMrYmXeUzYYWDKokqGOpJ3tMgxfriJZlEs6TedLVPiwEPn91w4XFO/lgHpF6k2LBK/nUuegMZ1reXMjT2YMlo1MvHWdZk7IW9YhqUDDbjZXiiDAjo6bqM/a3dwHqG+cjp5aMu1JV23E+gYJVGzNIUiOcJ8K7mZHDu5YOnv1YxWuohO7i7FDnWTwwZvyk85at38s49+xdFYzHyjZisPp6zGyldyS7oxZyLVhIuvwZtT7YvWWzrXnh/Hj6+kyLEe9S7FIU/O4GRPBsPjgC7HKXmTZJlD8nS6nlZqchOJPIi7Em18xTmF+eKFmyCSNkzk53VF/0OfumAiabrcNFOrVp4EZlSfBd9xOrQDHR3r+kAZ0/bDNtI30LF4jlCusBiemOP8gvcSuxY9osKcDbMEfReBIhCHKqiK4Lu2daL8LLBvJq6WNmZx7UnJPIJDZc5XMeI2JtpgwSuMyjqU4uj87B1koIOZUU0n3pgH0hoPdCchHnne7a4Vx3A+2rrmWOsVT5XD2z8WzxcUOasjBT3WX4hlOdOq8/UwPz10f99wc15LJeuWwgxmsXkfpzxd6qFCTKpwTv3PKnOu3kvdCZuz2lLSJSYWnE+WUhtcjxjyfdGN28ePoSnmhKp2yqwFyXhXRONsscxrGI4GLL5iNeeJHsMzbKrYTB1tryoac7odau6Gw0qOcfJobOCGU9rQ83ATuu4b3im67Uo49/M/4s7V8gcFu4EDLZkN/cE8t+4tj0jYrv/3m58DqVmQlhl1BxWRoavAP1lA0ZCobZnhuQNOXEPfW9ry3QLDsA9ze15gcYSgEyw/rb4UVJOmdVxMOuToPKAjFGkLe0KfC+TqV0zGigW1lgTCzHmiXVL6pmut0Y82XxNzeJQbwaPNCp+3euSXUMYm6iLq0p4Z9o+vUonf0GQCGBrWnBfmwPMMbcbryYKzfdB2t7z2zPgjUDe9jhhUL035tEEAnVM4YT5s/RIJ8dccDVqB88zUEW3lzqeRHHAKxmbB5F4PPU+1HfV2sje5507QBwvHclIoEjydTFtegtsjbu1nO0sxrWQuXVAwowseJnbKxVy6QPVzGUm9ytIUp160/j6hKMPgQ6Z/hwalvzSWRkjftNAaNZfgfq0LU2Pi3CDuSPCVNFBX/A03PRrO1PIUNZfpqk5aOqdKQjMYtaZAMSBsFkZXCFwOYaus/aj6GA9DjIU5p7XY4JV3FEqaSNs82oiIc7XfgMtMs/GoJgz2dJqVHXsN+ZkK3ZtVWmUV2MmFRWqdN1cySU4vOQsxBBjcgaKoOo/Wge0aFsFPLwOGB74+MN8PcLquIY7tTUEZx0yrQt0WnNtRAcagT2Kd0TRBcdcOlGEMhyKasBX5XRcgrQ1fCBOxoGDotEp8SDq3L4E7c0q8s+mp/v+UqZXA02wXenxJ3pmqbU3qII2X0xeRyI7vrbJkC3HmNrqmmjjF+N1J+Vww/NF+UswjwrlxTubwDVoikLU3NikIH2yTOCCsFVjnCs2i4gV+vjcNYQBDbbFolfBustFnoYSaXJmVPxBXmqZxMf+jT4VoolwgpfsifJkPw02zcWTb4+oj1JpzO9GNV61FSlu5HTd1lwCTb+LvTOBhrITTAl8KiZtmye5bieaYHkSWj7TWuY9uCySQu5eER4n1Y4xcmtqWs/SF/4Il6A29bn5zglPnaX7hzjK5Fr/IFzhVzOzWfMpWHPYIfwWm2fSqlEqardpVymESRzzQ00g8mROT+mNM4msYn/jFW4DCuGbRqGkc5lVv8h+Q8VsWlwXune29dq4DMNRVAOsTXjg+PrmNTr9Rj/Mo9cgFHOzvDF5EQZv/fiXREuwgrzsRGVQloqF4nNzzOlFk5AEOn24P697Wx3kkA/ErJpX2UAlHi8jqDHPTmlii65d+uxfTG9OBMLbXbIa+wfHQOPahK1fAZCGzFc6UQQBOxXEX8ROzS2UpEzTw9ASEF255bcuJeGzOz1aYYVyDZdG9hZTpH2MQlfIJoteOxQn9GFBKPZIMRyZ9lHL9AZT6A8aWIwv9pgeT/phcVBNHK/+F0MarP2au7jGStB9SIa5ZgAEzxqQMpI2cMVp2HHAOKD7FvFcTj9SGiJ6zlAXvuA5rR7t5aLSz6WyqP9Y0bQJbz7Z8F/CU3G+8V/LNGCmtT0PT6goCt1k6cGeDp5tFNGjIT/p7D1c4Y2Z+r8ZPWASb8HAaIzLb8VKZKVolpquw/GMzzQQDKyzkxpxbthK+37IhkvBrKf2apFtxkznDoL6F7iIfHVo6WuG9E881w7K9JllC3uJEU0I+8iRlmWKR3aS1buBoJZh1IyDPHY+WYXM3npD7wiNLYyuT+DjkXC2Lzk/crPkNj83w9A3EThK/m2Ik1zDdYnTl38zOLYrSfTempfQoAJpzXPIaoqfFAqoXrBIcxH7OvcV9ztbmmcOw2Qe8ur1lmvOKKczzGCLXYLBW3Xpb65wB/yvThUNnbFj4Bste10YFI+L3CsJqqjtGcTy/0QvoBsD8ZnfKAzjat8PF4MrL1PsoVOSqk+gBdhCIlmWsPeQ9j9OMQp8PFeIhyNDzfzDRkpl9i8OZIrlbB+wVntw1LQRUYfFYH9zIlLYsq1XgZj1xZz1x551xP7QazUapyM98KJFTOP1jwOSa6+4UC1d2wt0RqiPG1geTZifcrDPuJ76S6Sd5P+ysCzZha45HDGzZ7yqTqg4B1kw3M6bA6Y4qJGdPsGs3tPYGn9q6a+0ZEk/AHMhE98ASZxpA+KDiFKsKaCwVncMIF6VPBxSElZRowGqzNgxJ+FjWrrtWMPybvTPcfiJ3ZqVbkpcpi2Rd4IQ9gkc892YVMLOgkZ+Do/If2rPPUu1M6ofSOKGfT9DvCDbwkH3wxrfCazclDX7JBA33MMVE37VNTx/AI2Gm9iCKhkzI+MlXK4tDtFJwkwJNcbyhoIba4xFO9YHjqo298abNbhdTwXK86h5Z56YyxZTk9x04IiwgResMib0rXzeGPtwnszXWbjXrUmtL4Jk7OOXetvY0mirjsYHl4DA4OiMyLB0guX/sYlocSlfL6b4+fwR9XMJhQbAEBG1AUKBSsr4SOJoA9VETwVP+9qY4Gk6faQTPhoDPhoDPh4A/dwHDLkeoh6UG/cbNaRJwim03gskF+ooXWY/XXcUos8xGYTkbheV8FJbPo7B8GYXlz/4slxhOGAs5WwVYUfInelHNxqM6G4/qfAyqOcuDd+vBnIPXdwPLbBSWs1FYzgeywHGNqcrQU3ItcArJ3nahuVG412Q2farQZjUF1kq6pNXYSx6gCaXvVnTZkccsOTEVki8QfOL8vKNFd0inmIjGaniWbJSmZ8lGaXyaLBzxLcPxXhKqJwk2oHJZmtk4NGfj0JyPQ/N5HJov49D82Z3GGEA1iwB1kAk5186m91cneKxMuj3ltOcWb3jj/ttqpp85044XTOa6C9MSZEpkVsiENz1kWv7MmYwceNNBpku22dBgIMjslTNUrdAVZ0nbSbZMKK8lntw+AYRumE0vsLtYyuxNj0ZLfBDSISldpo2nR+wx01YS773kwXOCMeLcFgkMy1XA34x3RyDWHV4MdwaTF7DdruWIxPmiB6bMfFGXGSfD8GC2eno2CypPNKvGQsbjjBHlepcc/xHrMakgrxh7cfDv/wE=";Sidebar.prototype.searchFileUrl=
@@ -4143,15 +4144,15 @@ l.vertex=!0;var m=new mxCell("Hello %USER_FULL_NAME%!\n\nAt vero eos et accusamu
new mxGeometry(0,180,800,240),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fontSize=12;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacing=10;verticalAlign=top;whiteSpace=wrap;");m.vertex=!0;var n=new mxCell("Insert System Variable",new mxGeometry(650,160,120,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;align=right;fontSize=10;whiteSpace=wrap;");n.vertex=!0;var p=new mxCell("",new mxGeometry(772,167,8,4),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");
p.vertex=!0;var q=new mxCell("%USER_FULL_NAME%\n%USER_EMAIL%\n%USER_PROFILE_COMPLETENESS%\n%USER_NUM_SUCCESS_TRADES%\n%USER_FULL_NAME%\n%USER_EMAIL%\n%USER_PROFILE_COMPLETENESS%\n%USER_NUM_SUCCESS_SELLS%",new mxGeometry(550,175,240,140),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=2;strokeColor=#dddddd;fillColor=#ffffff;align=left;verticalAlign=top;spacing=10;shadow=1;whiteSpace=wrap;");q.vertex=!0;var t=new mxCell("Message Type",new mxGeometry(0,440,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
t.vertex=!0;var u=new mxCell("Email + Push",new mxGeometry(0,460,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacingLeft=10;fontSize=16;whiteSpace=wrap;");u.vertex=!0;var v=new mxCell("",new mxGeometry(370,477,10,5),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");v.vertex=!0;var x=new mxCell("Tap target",new mxGeometry(410,440,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
-x.vertex=!0;var z=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacingLeft=10;fontSize=16;whiteSpace=wrap;");z.vertex=!0;var y=new mxCell("",new mxGeometry(780,477,10,5),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");y.vertex=!0;var B=new mxCell("Send to Group",new mxGeometry(0,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
-B.vertex=!0;var A=new mxCell("Top Management",new mxGeometry(10,543,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");A.vertex=!0;var C=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");C.vertex=!0;var E=new mxCell("Design Department",
+x.vertex=!0;var y=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacingLeft=10;fontSize=16;whiteSpace=wrap;");y.vertex=!0;var A=new mxCell("",new mxGeometry(780,477,10,5),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");A.vertex=!0;var B=new mxCell("Send to Group",new mxGeometry(0,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
+B.vertex=!0;var z=new mxCell("Top Management",new mxGeometry(10,543,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");z.vertex=!0;var C=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");C.vertex=!0;var E=new mxCell("Design Department",
new mxGeometry(10,583,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");E.vertex=!0;var F=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");F.vertex=!0;var D=new mxCell("Supply Department",new mxGeometry(10,623,14,
14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");D.vertex=!0;var K=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");K.vertex=!0;var H=new mxCell("",new mxGeometry(420,543,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
H.vertex=!0;var J=new mxCell("News",new mxGeometry(440,543,40,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");J.vertex=!0;var I=new mxCell("",new mxGeometry(420,563,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton;strokeColor=#999999;fillColor=#ffffff;");I.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#55BFE0;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");
-L.vertex=!0;var M=new mxCell("",new mxGeometry(420,583,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");M.vertex=!0;var Q=new mxCell("Documents",new mxGeometry(440,583,70,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#EFAC43;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");Q.vertex=!0;var W=new mxCell("",new mxGeometry(420,603,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
-W.vertex=!0;var O=new mxCell("Media",new mxGeometry(440,603,40,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");O.vertex=!0;var G=new mxCell("",new mxGeometry(420,623,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");G.vertex=!0;var X=new mxCell("Text",new mxGeometry(440,623,30,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#999999;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");
-X.vertex=!0;var N=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");N.vertex=!0;var da=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fillColor=#ffffff;align=center;rSize=5;strokeColor=#dddddd;fontSize=16;whiteSpace=wrap;");da.vertex=!0;var Y=new mxCell("Delete Template",new mxGeometry(630,
-680,170,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#DB524C;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");Y.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,z,y,B,A,C,E,F,D,K,H,J,I,L,M,Q,W,O,G,X,N,da,Y],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");
+L.vertex=!0;var M=new mxCell("",new mxGeometry(420,583,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");M.vertex=!0;var Q=new mxCell("Documents",new mxGeometry(440,583,70,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#EFAC43;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");Q.vertex=!0;var X=new mxCell("",new mxGeometry(420,603,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
+X.vertex=!0;var N=new mxCell("Media",new mxGeometry(440,603,40,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");N.vertex=!0;var G=new mxCell("",new mxGeometry(420,623,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");G.vertex=!0;var W=new mxCell("Text",new mxGeometry(440,623,30,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#999999;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");
+W.vertex=!0;var O=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");O.vertex=!0;var ca=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fillColor=#ffffff;align=center;rSize=5;strokeColor=#dddddd;fontSize=16;whiteSpace=wrap;");ca.vertex=!0;var Y=new mxCell("Delete Template",new mxGeometry(630,
+680,170,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#DB524C;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");Y.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,y,A,B,z,C,E,F,D,K,H,J,I,L,M,Q,X,N,G,W,O,ca,Y],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");
c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,.5,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;strokeColor=#dddddd;fillColor=none;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark as OK",new mxGeometry(0,.5,90,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");d.geometry.relative=
!0;d.geometry.offset=new mxPoint(150,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark as Violation",new mxGeometry(0,.5,120,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(250,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,.5,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");
d.geometry.relative=!0;d.geometry.offset=new mxPoint(-110,-15);d.vertex=!0;c.insert(d);d=new mxCell("Phone",new mxGeometry(40,70,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");d.vertex=!0;var b=new mxCell("",new mxGeometry(13,103,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;strokeColor=#999999;fillColor=#ffffff;");b.vertex=!0;var e=new mxCell("+38 (066) 875 67 97",new mxGeometry(40,
@@ -4165,18 +4166,18 @@ g.vertex=!0;var k=new mxCell("Company",new mxGeometry(40,140,100,20),"html=1;sha
m.vertex=!0;var n=new mxCell("ok",new mxGeometry(700,170,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;align=center;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");n.vertex=!0;var p=new mxCell("Working from",new mxGeometry(40,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");p.vertex=!0;var q=new mxCell("",new mxGeometry(13,
243,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");q.vertex=!0;var t=new mxCell("October",new mxGeometry(40,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");t.vertex=!0;var u=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;whiteSpace=wrap;");
u.geometry.relative=!0;u.geometry.offset=new mxPoint(-30,-3);u.vertex=!0;t.insert(u);u=new mxCell("2011",new mxGeometry(190,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");u.vertex=!0;var v=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;whiteSpace=wrap;");v.geometry.relative=!0;v.geometry.offset=new mxPoint(-30,
--3);v.vertex=!0;u.insert(v);v=new mxCell("Working to",new mxGeometry(400,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");v.vertex=!0;var x=new mxCell("Current time",new mxGeometry(580,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;align=right;spacingRight=5;fontColor=#55C0E0;whiteSpace=wrap;");x.vertex=!0;var z=new mxCell("",new mxGeometry(340,
-240,40,20),"shape=line;strokeWidth=2;shadow=0;dashed=0;");z.vertex=!0;var y=new mxCell("December",new mxGeometry(400,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");y.vertex=!0;var B=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;");B.geometry.relative=!0;B.geometry.offset=new mxPoint(-30,-3);B.vertex=
-!0;y.insert(B);B=new mxCell("2012",new mxGeometry(550,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");B.vertex=!0;var A=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;");A.geometry.relative=!0;A.geometry.offset=new mxPoint(-30,-3);A.vertex=!0;B.insert(A);A=new mxCell("ok",new mxGeometry(700,240,30,20),
-"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;align=center;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");A.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,z,y,B,A],800,270,"Experience")}),this.addEntry("bootstrap skills",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");c.vertex=!0;var d=new mxCell("Select fields to update status",
+-3);v.vertex=!0;u.insert(v);v=new mxCell("Working to",new mxGeometry(400,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");v.vertex=!0;var x=new mxCell("Current time",new mxGeometry(580,210,100,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;align=right;spacingRight=5;fontColor=#55C0E0;whiteSpace=wrap;");x.vertex=!0;var y=new mxCell("",new mxGeometry(340,
+240,40,20),"shape=line;strokeWidth=2;shadow=0;dashed=0;");y.vertex=!0;var A=new mxCell("December",new mxGeometry(400,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");A.vertex=!0;var B=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;");B.geometry.relative=!0;B.geometry.offset=new mxPoint(-30,-3);B.vertex=
+!0;A.insert(B);B=new mxCell("2012",new mxGeometry(550,230,130,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");B.vertex=!0;var z=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#000000;strokeColor=none;perimeter=none;");z.geometry.relative=!0;z.geometry.offset=new mxPoint(-30,-3);z.vertex=!0;B.insert(z);z=new mxCell("ok",new mxGeometry(700,240,30,20),
+"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;align=center;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");z.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,y,A,B,z],800,270,"Experience")}),this.addEntry("bootstrap skills",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");c.vertex=!0;var d=new mxCell("Select fields to update status",
new mxGeometry(0,.5,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#dddddd;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,.5,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;fillColor=#fdfdfd;whiteSpace=wrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-120,
-15);d.vertex=!0;c.insert(d);d=new mxCell("",new mxGeometry(13,103,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");d.vertex=!0;var b=new mxCell("Engineering",new mxGeometry(40,90,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");b.vertex=!0;var e=new mxCell("ok",new mxGeometry(700,100,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
e.vertex=!0;var g=new mxCell("",new mxGeometry(13,173,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");g.vertex=!0;var k=new mxCell("Thinking",new mxGeometry(40,160,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#FDF8E4;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");k.vertex=!0;var l=new mxCell("To Moderate",new mxGeometry(700,170,90,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#EFAC43;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
l.vertex=!0;var m=new mxCell("",new mxGeometry(13,243,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");m.vertex=!0;var n=new mxCell("Working",new mxGeometry(40,230,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");n.vertex=!0;var p=new mxCell("ok",new mxGeometry(700,240,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
p.vertex=!0;var q=new mxCell("",new mxGeometry(13,313,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");q.vertex=!0;var t=new mxCell("Sleeping",new mxGeometry(40,300,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");t.vertex=!0;var u=new mxCell("ok",new mxGeometry(700,310,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
-u.vertex=!0;var v=new mxCell("",new mxGeometry(13,383,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");v.vertex=!0;var x=new mxCell("Eating",new mxGeometry(40,370,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");x.vertex=!0;var z=new mxCell("ok",new mxGeometry(700,380,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
-z.vertex=!0;var y=new mxCell("",new mxGeometry(13,453,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");y.vertex=!0;var B=new mxCell("Walking",new mxGeometry(40,440,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");B.vertex=!0;var A=new mxCell("ok",new mxGeometry(700,450,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
-A.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,z,y,B,A],800,480,"Skills")}),this.addEntry("bootstrap chat",function(){var c=new mxCell("",new mxGeometry(0,0,400,660),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=#333333;fillColor=#ffffff;whiteSpace=wrap;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,400,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=#333333;fillColor=#333333;whiteSpace=wrap;resizeWidth=1;");d.geometry.relative=
+u.vertex=!0;var v=new mxCell("",new mxGeometry(13,383,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");v.vertex=!0;var x=new mxCell("Eating",new mxGeometry(40,370,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");x.vertex=!0;var y=new mxCell("ok",new mxGeometry(700,380,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
+y.vertex=!0;var A=new mxCell("",new mxGeometry(13,453,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=3;strokeColor=#999999;fillColor=#ffffff;");A.vertex=!0;var B=new mxCell("Walking",new mxGeometry(40,440,640,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#999999;fillColor=#ffffff;align=left;fontSize=16;spacingLeft=10;whiteSpace=wrap;");B.vertex=!0;var z=new mxCell("ok",new mxGeometry(700,450,30,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontSize=12;fontStyle=1;fontColor=#ffffff;whiteSpace=wrap;");
+z.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,t,u,v,x,y,A,B,z],800,480,"Skills")}),this.addEntry("bootstrap chat",function(){var c=new mxCell("",new mxGeometry(0,0,400,660),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=#333333;fillColor=#ffffff;whiteSpace=wrap;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,400,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=#333333;fillColor=#333333;whiteSpace=wrap;resizeWidth=1;");d.geometry.relative=
!0;d.vertex=!0;c.insert(d);var b=new mxCell("John Boo",new mxGeometry(0,.5,30,30),"shape=ellipse;strokeColor=none;fillColor=#f0f0f0;labelPosition=right;align=left;spacingLeft=10;fontColor=#f0f0f0;html=1;");b.geometry.relative=!0;b.geometry.offset=new mxPoint(15,-15);b.vertex=!0;d.insert(b);var e=new mxCell("",new mxGeometry(.5,.5,20,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.user;strokeColor=none;fillColor=#999999;");e.geometry.relative=!0;e.geometry.offset=new mxPoint(-10,-10);e.vertex=
!0;b.insert(e);b=new mxCell("Michael Robinson",new mxGeometry(1,.5,30,30),"shape=ellipse;strokeColor=none;fillColor=#f0f0f0;labelPosition=left;align=right;spacingRight=10;fontColor=#f0f0f0;html=1;");b.geometry.relative=!0;b.geometry.offset=new mxPoint(-45,-15);b.vertex=!0;d.insert(b);d=new mxCell("",new mxGeometry(.5,.5,20,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.user;strokeColor=none;fillColor=#999999;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-10,-10);d.vertex=!0;b.insert(d);
d=new mxCell("15 September 2013",new mxGeometry(0,0,400,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=none;fillColor=#fdfdfd;fontColor=#999999;whiteSpace=wrap;resizeWidth=1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(0,75);d.vertex=!0;c.insert(d);d=new mxCell("Hi man!",new mxGeometry(0,0,80,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=none;fillColor=#E0F0D6;align=left;spacingLeft=15;whiteSpace=wrap;");d.geometry.relative=
@@ -4367,17 +4368,17 @@ this.addPalette("eipMessaging Systems","EIP / Messaging Systems",a||!1,mxUtils.b
70,90,"","Smart Proxy",null,null,this.getTagsForStencil("mxgraph.eip","smart_proxy","eip enterprise integration pattern system management ").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.test_message;fillColor=#c0f5a9;strokeColor=#000000;",150,90,"","Test Message",null,null,this.getTagsForStencil("mxgraph.eip","test_message","eip enterprise integration pattern system management ").join(" ")),
this.createVertexTemplateEntry("strokeWidth=2;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.wire_tap;fillColor=#c0f5a9;strokeColor=#000000;",150,90,"","Wire Tap",null,null,this.getTagsForStencil("mxgraph.eip","wire_tap","eip enterprise integration pattern system management ").join(" "))])}})();
(function(){Sidebar.prototype.addElectricalPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;shadow=0;dashed=0;align=center;fillColor=#ffffff;html=1;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;strokeWidth=1;"+mxConstants.STYLE_SHAPE,c=a+"=mxgraph.electrical.abstract.",f=a+"=mxgraph.electrical.capacitors.",d="fillColor=#000000;"+a+"=mxgraph.electrical.diodes.",b=a+"=mxgraph.electrical.inductors.",e=a+"=mxgraph.electrical.miscellaneous.",g=a+"=mxgraph.electrical.electro-mechanical.",
-k=a+"=mxgraph.electrical.logic_gates.",l=a+"=mxgraph.electrical.mosfets1.",m=a+"=mxgraph.electrical.transistors.",n=a+"=mxgraph.electrical.opto_electronics.",p=a+"=mxgraph.electrical.plc_ladder.",q=a+"=mxgraph.electrical.radio.",t=a+"=mxgraph.electrical.resistors.",u=a+"=mxgraph.electrical.signal_sources.",v=a+"=mxgraph.electrical.thermionic_devices.",x=a+"=mxgraph.electrical.waveforms.",z="perimeter=ellipsePerimeter;"+a+"=mxgraph.electrical.instruments.",y=a+"=mxgraph.electrical.iec_logic_gates.",
-B=a+"=mxgraph.electrical.rot_mech.",A=a+"=mxgraph.electrical.transmission.";this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(k+"and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"buffer;",100,60,"","Buffer",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","buffer","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+
+k=a+"=mxgraph.electrical.logic_gates.",l=a+"=mxgraph.electrical.mosfets1.",m=a+"=mxgraph.electrical.transistors.",n=a+"=mxgraph.electrical.opto_electronics.",p=a+"=mxgraph.electrical.plc_ladder.",q=a+"=mxgraph.electrical.radio.",t=a+"=mxgraph.electrical.resistors.",u=a+"=mxgraph.electrical.signal_sources.",v=a+"=mxgraph.electrical.thermionic_devices.",x=a+"=mxgraph.electrical.waveforms.",y="perimeter=ellipsePerimeter;"+a+"=mxgraph.electrical.instruments.",A=a+"=mxgraph.electrical.iec_logic_gates.",
+B=a+"=mxgraph.electrical.rot_mech.",z=a+"=mxgraph.electrical.transmission.";this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(k+"and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"buffer;",100,60,"","Buffer",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","buffer","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+
"d_type_flip-flop;",100,80,"","D Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"d_type_flip-flop_with_clear;",100,90,"","D Type Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_flip-flop_with_clear","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"d_type_rs_flip-flop;",100,100,"","D Type RS Flip-Flop",null,
null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_rs_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"inverter;",100,60,"","Inverter",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverter","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"inverting_contact;",5,5,"","Inverting Contact",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverting_contact","electrical logic gate ").join(" ")),
this.createVertexTemplateEntry(k+"jk_flip-flop;",100,80,"","JK Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"jk_flip-flop_with_clear;",100,90,"","JK Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop_with_clear","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"jk_flip-flop_with_sr;",100,100,"","JK Flip-Flop With SR",
null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop_with_sr","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"nand;",100,60,"","NAND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","nand","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"nor;",100,60,"","NOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","nor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"or;",100,
60,"","OR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","or","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"rs_latch;",100,80,"","RS Latch",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","rs_latch","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"synchronous_rs_latch;",100,80,"","RS Latch (Synchronous)",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","synchronous_rs_latch","electrical logic gate ").join(" ")),
this.createVertexTemplateEntry(k+"schmitt_trigger;",100,60,"","Schmitt Trigger",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","schmitt_trigger","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"t_type_flip-flop;",100,80,"","T Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","t_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xnor;",100,60,"","XNOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
-"xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xor;",100,60,"","XOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(y+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"nand;",66,80,"","NAND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
-"nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"nor;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"not;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
-"xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(y+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" "))]);this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(t+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+
+"xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xor;",100,60,"","XOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(A+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"nand;",66,80,"","NAND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
+"nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"nor;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"not;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
+"xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" "))]);this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(t+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+
"resistor_2;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"potentiometer_1;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"potentiometer_2;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_2",
"electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"trimmer_pot_1;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"trimmer_pot_2;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"trimmer_resistor_1;",100,65.5,
"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"trimmer_resistor_2;",100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(t+"variable_resistor_1;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
@@ -4443,9 +4444,9 @@ this.createVertexTemplateEntry(u+"dependent_source_1;",60,60,"","Dependent",null
"p-channel_jfet_1","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"n-channel_mosfet_1;",95,100,"","MOSFET (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","n-channel_mosfet_1","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"p-channel_mosfet_1;",95,100,"","MOSFET (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","p-channel_mosfet_1","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"mosfet_ic_n;",
95,100,"","MOSFET Inductive Channel (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","mosfet_ic_n","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"mosfet_ic_p;",95,100,"","MOSFET Inductive Channel (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","mosfet_ic_p","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"mosfet_n_no_bulk;",95,100,"","MOSFET No Bulk (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors",
"mosfet_n_no_bulk","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"mosfet_p_no_bulk;",95,100,"","MOSFET No Bulk (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","mosfet_p_no_bulk","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"p-channel_mosfet_1;",95,100,"","MOSFET (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","p-channel_mosfet_1","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"dual_gate_mosfet_n;",
-95,100,"","Dual Gate MOSFET (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","dual_gate_mosfet_n","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"dual_gate_mosfet_p;",95,100,"","Dual Gate MOSFET (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","dual_gate_mosfet_p","electrical transistor ").join(" "))]);this.addPaletteFunctions("electricalInstruments","Electrical / Instruments",!1,[this.createVertexTemplateEntry(z+"ampermeter;",90,
-90,"","Ampermeter",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","ampermeter","electrical instrument ").join(" ")),this.createVertexTemplateEntry(z+"galvanometer;",90,90,"","Galvanometer",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","galvanometer","electrical instrument ").join(" ")),this.createVertexTemplateEntry(z+"oscilloscope;",90,90,"","Oscilloscope",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","oscilloscope","electrical instrument ").join(" ")),
-this.createVertexTemplateEntry(z+"signal_generator;",90,90,"","Signal Generator",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","signal_generator","electrical instrument ").join(" ")),this.createVertexTemplateEntry(z+"voltmeter;",90,90,"","Voltmeter",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","voltmeter","electrical instrument ").join(" "))]);this.addPaletteFunctions("electricalMisc","Electrical / Misc",!1,[this.createVertexTemplateEntry(q+"aerial_-_antenna_1;",
+95,100,"","Dual Gate MOSFET (N)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","dual_gate_mosfet_n","electrical transistor ").join(" ")),this.createVertexTemplateEntry(l+"dual_gate_mosfet_p;",95,100,"","Dual Gate MOSFET (P)",null,null,this.getTagsForStencil("mxgraph.electrical.transistors","dual_gate_mosfet_p","electrical transistor ").join(" "))]);this.addPaletteFunctions("electricalInstruments","Electrical / Instruments",!1,[this.createVertexTemplateEntry(y+"ampermeter;",90,
+90,"","Ampermeter",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","ampermeter","electrical instrument ").join(" ")),this.createVertexTemplateEntry(y+"galvanometer;",90,90,"","Galvanometer",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","galvanometer","electrical instrument ").join(" ")),this.createVertexTemplateEntry(y+"oscilloscope;",90,90,"","Oscilloscope",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","oscilloscope","electrical instrument ").join(" ")),
+this.createVertexTemplateEntry(y+"signal_generator;",90,90,"","Signal Generator",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","signal_generator","electrical instrument ").join(" ")),this.createVertexTemplateEntry(y+"voltmeter;",90,90,"","Voltmeter",null,null,this.getTagsForStencil("mxgraph.electrical.instruments","voltmeter","electrical instrument ").join(" "))]);this.addPaletteFunctions("electricalMisc","Electrical / Misc",!1,[this.createVertexTemplateEntry(q+"aerial_-_antenna_1;",
80,100,"","Antenna",null,null,this.getTagsForStencil("mxgraph.electrical.radio","aerial_-_antenna_1","electrical radio audio ").join(" ")),this.createVertexTemplateEntry(q+"aerial_-_antenna_2;",79,100,"","Antenna",null,null,this.getTagsForStencil("mxgraph.electrical.radio","aerial_-_antenna_2","electrical radio audio ").join(" ")),this.createVertexTemplateEntry(q+"loop_antenna;",64.8,69.78,"","Loop Antenna",null,null,this.getTagsForStencil("mxgraph.electrical.radio","loop_antenna","electrical radio audio ").join(" ")),
this.createVertexTemplateEntry(e+"loop_antenna",100,100,"","Loop Antenna",null,null,this.getTagsForStencil("mxgraph.electrical.signal_sources","loop antenna","electrical ").join(" ")),this.createVertexTemplateEntry(mxConstants.STYLE_SHAPE+"=mxgraph.electrical.electro-mechanical.motor_1;html=1;shadow=0;dashed=0;fillColor=#ffffff;align=center;fontSize=30;strokeColor=#000000;strokeWidth=1;",100,60,"M","Electrical Motor",null,null,this.getTagsForStencil("mxgraph.electrical.electro-mechanical","motor_1",
"electrical switch relay ").join(" ")),this.createVertexTemplateEntry(mxConstants.STYLE_SHAPE+"=mxgraph.electrical.electro-mechanical.motor_2;html=1;shadow=0;dashed=0;fillColor=#ffffff;align=center;fontSize=30;strokeColor=#000000;strokeWidth=1;",100,60,"","Motor Armature",null,null,this.getTagsForStencil("mxgraph.electrical.electro-mechanical","motor_2","electrical switch relay ").join(" ")),this.createVertexTemplateEntry(e+"co-ax;",40,60,"","Co-Ax",null,null,this.getTagsForStencil("mxgraph.electrical.miscellaneous",
@@ -4511,17 +4512,17 @@ this.createVertexTemplateEntry(B+"verticalLabelPosition=bottom;shadow=0;dashed=0
this.createVertexTemplateEntry(B+"clutch_2;",90,60,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"delayed_action;",72,50,"","Delayed Action",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","delayed action","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"manual_control;",50,50,"","Manual Control",
null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","manual control","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"blocking_device;",100,15,"","Blocking Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","blocking device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"latching_device;",100,22,"","Latching Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
"latching device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"mechanical_interlock;",100,30,"","Mechanical Interlock",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","mechanical interlock","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"automatic_return;",100,12,"","Automatic Return",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","automatic_return",
-"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"detent;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);var C=[this.createVertexTemplateEntry(A+"bus_width;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+
-"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"cable_group;",130,130,"","Cable Group",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,
-this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;fillColor=#ffffff;strokeColor=#000000;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;",
-10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"terminal_3_phase;",43,10,"","Terminal 3 Phase",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;fillColor=#ffffff;strokeColor=#000000;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontColor=#000000;fontSize=50;fontStyle=1;perimeter=ellipsePerimeter;",
-130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"line_cable;",130,60,"","Line/Cable",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line cable","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"anticreepage_device;",130,88,"","Anticreepage Device",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"anticreepage device","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"testPoint;",60,130,"","Test Point",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","test point","electrical transmission paths bus buses").join(" ")),this.createEdgeTemplateEntry("endArrow=none;html=1;strokeColor=#000000;strokeWidth=1;",100,0,"","Transmission Path",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","transmission path").join(" ")),this.createEdgeTemplateEntry("endArrow=classicThin;html=1;strokeColor=#000000;strokeWidth=1;endSize=20;",
-100,0,"","Direction of Flow",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","direction flow").join(" ")),this.createVertexTemplateEntry(A+"straightBus;",90,130,"","Straight Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","straight bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeColor=#000000;strokeWidth=1;fillColor=#FFFFFF;",
+"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(B+"detent;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);var C=[this.createVertexTemplateEntry(z+"bus_width;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+
+"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"cable_group;",130,130,"","Cable Group",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,
+this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;fillColor=#ffffff;strokeColor=#000000;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;",
+10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"terminal_3_phase;",43,10,"","Terminal 3 Phase",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;fillColor=#ffffff;strokeColor=#000000;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontColor=#000000;fontSize=50;fontStyle=1;perimeter=ellipsePerimeter;",
+130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"line_cable;",130,60,"","Line/Cable",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line cable","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"anticreepage_device;",130,88,"","Anticreepage Device",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"anticreepage device","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"testPoint;",60,130,"","Test Point",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","test point","electrical transmission paths bus buses").join(" ")),this.createEdgeTemplateEntry("endArrow=none;html=1;strokeColor=#000000;strokeWidth=1;",100,0,"","Transmission Path",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","transmission path").join(" ")),this.createEdgeTemplateEntry("endArrow=classicThin;html=1;strokeColor=#000000;strokeWidth=1;endSize=20;",
+100,0,"","Direction of Flow",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","direction flow").join(" ")),this.createVertexTemplateEntry(z+"straightBus;",90,130,"","Straight Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","straight bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeColor=#000000;strokeWidth=1;fillColor=#FFFFFF;",
130,130,"","Elbow Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeColor=#000000;strokeWidth=1;fillColor=#FFFFFF;flipH=1;",130,130,"","Elbow Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(A+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(A+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(A+
+this.createVertexTemplateEntry(z+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
+this.createVertexTemplateEntry(z+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(z+
"eightLineBusElbow;notch=180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(b){for(var a=0;a<C.length;a++)b.appendChild(C[a](b))}))}})();
(function(){Sidebar.prototype.addErPalette=function(){var a=this,c=new mxCell("Row",new mxGeometry(0,0,40,26),"text;html=1;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");c.vertex=!0;var f=[this.addEntry("er entity relation table",function(){var d=new mxCell("Table",new mxGeometry(0,0,160,110),"swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;");
d.vertex=!0;d.insert(a.cloneCell(c,"Row 1"));d.insert(a.cloneCell(c,"Row 2"));d.insert(a.cloneCell(c,"Row 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Table")}),this.addEntry("er entity relation table section subsection",function(){var d=new mxCell("Section",new mxGeometry(0,0,140,110),"swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=22;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;");
@@ -4591,8 +4592,8 @@ p.vertex=!0;var q=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;fill
d.vertex=!0;var b=new mxCell("",new mxGeometry(50,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");b.vertex=!0;var c=new mxCell("",new mxGeometry(50,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");c.vertex=!0;var f=new mxCell("",new mxGeometry(0,50,43,40),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=north;");f.vertex=!0;var k=new mxCell("",new mxGeometry(517,50,43,40),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=south");
k.vertex=!0;var l=new mxCell("",new mxGeometry(110,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");l.vertex=!0;var m=new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");m.vertex=!0;var n=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(170,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");
p.vertex=!0;var q=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");q.vertex=!0;var t=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");t.vertex=!0;var u=new mxCell("",new mxGeometry(290,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");u.vertex=!0;var v=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");
-v.vertex=!0;var x=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");x.vertex=!0;var z=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");z.vertex=!0;var y=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");y.vertex=!0;var B=new mxCell("",new mxGeometry(410,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");
-B.vertex=!0;var A=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");A.vertex=!0;var C=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");C.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,m,n,p,q,t,u,v,x,z,y,B,A,C,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(a){for(var b=0;b<f.length;b++)a.appendChild(f[b](a))}))}})();
+v.vertex=!0;var x=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");x.vertex=!0;var y=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");y.vertex=!0;var A=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");A.vertex=!0;var B=new mxCell("",new mxGeometry(410,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");
+B.vertex=!0;var z=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;");z.vertex=!0;var C=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;fillColor=#ffffff;strokeColor=#000000;shadow=0;direction=west;");C.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,m,n,p,q,t,u,v,x,y,A,B,z,C,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(a){for(var b=0;b<f.length;b++)a.appendChild(f[b](a))}))}})();
(function(){Sidebar.prototype.addFlowchartPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;html=1;strokeWidth=2;shape=mxgraph.flowchart.";this.addPaletteFunctions("flowchart",mxResources.get("flowchart"),!1,[this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_1;align=left;",50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_1","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;",
50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_2","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.card;whiteSpace=wrap;",100,60,"","Card",null,null,this.getTagsForStencil("mxgraph.flowchart","card","").join(" ")),this.createVertexTemplateEntry(a+"collate;",100,100,"","Collate",null,null,this.getTagsForStencil("mxgraph.flowchart","collate","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.data;whiteSpace=wrap;",
100,60,"","Data",null,null,this.getTagsForStencil("mxgraph.flowchart","data","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.database;whiteSpace=wrap;",60,60,"","Database",null,null,this.getTagsForStencil("mxgraph.flowchart","database","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.decision;whiteSpace=wrap;",100,100,"","Decision",null,null,this.getTagsForStencil("mxgraph.flowchart","decision","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.delay;whiteSpace=wrap;",
@@ -7277,9 +7278,9 @@ StorageFile.prototype.saveFile=function(a,c,f,d){if(this.isEditable()){var b=mxU
[a]),b,d):b()}))}else null!=f&&f()};StorageFile.prototype.rename=function(a,c,f){var d=this.getTitle();this.title=a;this.hasSameExtension(d,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){d!=a&&this.ui.removeLocalData(d,c)}),f)};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,c,f){StorageFile.call(this,a,c,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,c,f){this.saveFile(a,!1,c,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,c,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};
-var StorageDialog=function(a,c,f){function d(b,d,e,g){function n(){mxEvent.addListener(p,"click",function(){e!=App.MODE_GOOGLE||a.isDriveDomain()?e==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,l.checked);c()})):(a.setMode(e,l.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";var v=document.createElement("img");
-v.setAttribute("src",b);v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width="60px";v.style.height="60px";v.style.paddingBottom="6px";p.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");p.appendChild(v);var q=document.createElement("div");p.appendChild(q);mxUtils.write(q,
-d);if(null!=g&&null==a[g]){v.style.visibility="hidden";mxUtils.setOpacity(q,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(p);var u=window.setTimeout(function(){null==a[g]&&(t.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(u),mxUtils.setOpacity(q,100),v.style.visibility="",t.stop(),n())}))}else n();k.appendChild(p);
+var StorageDialog=function(a,c,f){function d(b,d,e,g){function n(){mxEvent.addListener(p,"click",function(){e!=App.MODE_GOOGLE||a.isDriveDomain()?e==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,l.checked);c()})):(a.setMode(e,l.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";var q=document.createElement("img");
+q.setAttribute("src",b);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";p.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");p.appendChild(q);var v=document.createElement("div");p.appendChild(v);mxUtils.write(v,
+d);if(null!=g&&null==a[g]){q.style.visibility="hidden";mxUtils.setOpacity(v,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(p);var u=window.setTimeout(function(){null==a[g]&&(t.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(u),mxUtils.setOpacity(v,100),q.style.visibility="",t.stop(),n())}))}else n();k.appendChild(p);
++m>=f&&(mxUtils.br(k),m=0)}f=null!=f?f:3;var b=document.createElement("div");b.style.textAlign="center";b.style.whiteSpace="nowrap";b.style.paddingTop="0px";b.style.paddingBottom="20px";var e=a.addLanguageMenu(b);null!=e&&(e.style.bottom="28px");!a.isOffline()&&1<a.getServiceCount()&&(e=document.createElement("a"),e.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),e.setAttribute("title",mxResources.get("help")),e.setAttribute("target","_blank"),e.style.position="absolute",
e.style.textDecoration="none",e.style.cursor="pointer",e.style.fontSize="12px",e.style.bottom="28px",e.style.left="26px",e.style.color="gray",mxUtils.write(e,mxResources.get("help")),b.appendChild(e));var g=document.createElement("div");g.style.position="absolute";g.style.cursor="pointer";g.style.fontSize="12px";g.style.bottom="28px";g.style.color="gray";mxUtils.write(g,mxResources.get("decideLater"));a.isOfflineApp()?g.style.right="20px":(mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0)"),
g.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)g.style.marginLeft=-Math.round(g.clientWidth/2)+"px"};b.appendChild(g);mxEvent.addListener(g,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var k=document.createElement("div");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");k.style.border="1px solid #d3d3d3";k.style.borderWidth=
@@ -7310,22 +7311,22 @@ c+"</body></html>");l.close()}}),l.className="geBtn",g.appendChild(l));if(!e||75
m.setAttribute("src",Editor.facebookImage);m.setAttribute("border","0");n.appendChild(m);n.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";g.appendChild(n)}7168>c.length&&(n=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(k.value);window.open(b)}catch(q){a.handleError({message:q.message||
mxResources.get("drawingTooLarge")})}}),m=document.createElement("img"),m.setAttribute("src",Editor.tweetImage),m.setAttribute("border","0"),m.style.marginBottom="5px",n.appendChild(m),n.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",g.appendChild(n))}m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(m);n=mxUtils.button(mxResources.get("copy"),
function(){k.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?m.className="geBtn gePrimaryBtn":(g.appendChild(n),n.className="geBtn gePrimaryBtn",m.className="geBtn"):(g.appendChild(l),m.className="geBtn",l.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d},GoogleSitesDialog=function(a,
-c){function f(){var a=null!=E.getTitle()?E.getTitle():this.defaultFilename;if(A.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<C.length&&(c+="&s="+C);""!=t.value&&"0"!=t.value&&(c+="&border="+t.value);""!=p.value&&(c+="&height="+p.value);c+="&pan="+(u.checked?"1":"0");c+="&zoom="+(v.checked?"1":"0");c+="&fit="+(B.checked?"1":"0");c+="&resize="+(y.checked?"1":"0");c+="&x0="+
-Number(n.value);c+="&y0="+l;b.mathEnabled&&(c+="&math=1");z.checked?c+="&edit=_blank":x.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else E.constructor==DriveFile||E.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?c+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(c+=E.getHash().substring(1),c=E.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=a&&(c+="&title="+encodeURIComponent(a)),""!=
+c){function f(){var a=null!=E.getTitle()?E.getTitle():this.defaultFilename;if(z.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<C.length&&(c+="&s="+C);""!=t.value&&"0"!=t.value&&(c+="&border="+t.value);""!=p.value&&(c+="&height="+p.value);c+="&pan="+(u.checked?"1":"0");c+="&zoom="+(v.checked?"1":"0");c+="&fit="+(B.checked?"1":"0");c+="&resize="+(A.checked?"1":"0");c+="&x0="+
+Number(n.value);c+="&y0="+l;b.mathEnabled&&(c+="&math=1");y.checked?c+="&edit=_blank":x.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else E.constructor==DriveFile||E.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?c+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(c+=E.getHash().substring(1),c=E.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=a&&(c+="&title="+encodeURIComponent(a)),""!=
p.value&&(a=parseInt(p.value)+parseInt(n.value),c+="&height="+a),m.value=c):m.value=""}var d=document.createElement("div"),b=a.editor.graph,e=b.getGraphBounds(),g=b.view.scale,k=Math.floor(e.x/g-b.view.translate.x),l=Math.floor(e.y/g-b.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";d.appendChild(m);mxUtils.br(d);this.init=
function(){m.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=k;d.appendChild(n);mxUtils.write(d,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","4");p.style.marginLeft=
"4px";p.value=Math.ceil(e.height/g);d.appendChild(p);mxUtils.br(d);e=document.createElement("hr");e.setAttribute("size","1");e.style.marginBottom="16px";e.style.marginTop="16px";d.appendChild(e);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);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=c||"";d.appendChild(q);mxUtils.br(d);mxUtils.write(d,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";d.appendChild(t);mxUtils.br(d);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("pan")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked",
-"checked");v.defaultChecked=!0;v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);d.appendChild(x);mxUtils.write(d,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("asNew")+" ");mxUtils.br(d);var y=
-document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";d.appendChild(B);mxUtils.write(d,mxResources.get("fit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,mxResources.get("embed")+
-" ");var C=a.getBasenames().join(";"),E=a.getCurrentFile();mxEvent.addListener(u,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(n,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(q,"change",f);f();mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_FF||
+"checked");v.defaultChecked=!0;v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);d.appendChild(x);mxUtils.write(d,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";d.appendChild(y);mxUtils.write(d,mxResources.get("asNew")+" ");mxUtils.br(d);var A=
+document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";d.appendChild(A);mxUtils.write(d,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";d.appendChild(B);mxUtils.write(d,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("embed")+
+" ");var C=a.getBasenames().join(";"),E=a.getCurrentFile();mxEvent.addListener(u,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(n,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(q,"change",f);f();mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_FF||
5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn gePrimaryBtn";e.appendChild(g);d.appendChild(e);this.container=d},CreateGraphDialog=function(a,c,f){var d=document.createElement("div");d.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);d.appendChild(b);var c=new Graph(b);c.setCellsCloneable(!0);c.setPanning(!0);c.setAllowDanglingEdges(!1);c.connectionHandler.select=!1;c.view.setTranslate(20,20);c.border=20;c.panningHandler.useLeftButtonForPanning=!0;var g="curved=1;";c.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))})};c.getAllConnectionConstraints=function(){return null};c.connectionHandler.marker.highlight.keepOnTop=!1;c.connectionHandler.createEdgeState=function(a){a=c.createEdge(null,null,
null,null,null,g);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var k=c.getDefaultParent(),l=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){c.connectionHandler.reset();c.clearSelection();var e=c.getCellGeometry(a),f;p(function(){f=c.insertVertex(k,null,"Entry",e.x,e.y,80,30,"rounded=1;");l(f);c.view.refresh(f);c.insertEdge(k,null,"",a,f,g)},function(){c.scrollCellToVisible(f)})});
b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),e=b.getProperty("state");c.popupMenuHandler.hideMenu();c.stopEditing(!1);var f=mxUtils.convertPoint(c.container,mxEvent.getClientX(d),mxEvent.getClientY(d));c.connectionHandler.start(e,f.x,f.y);c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});c.addCellOverlay(a,b)});c.getModel().beginUpdate();var m;try{m=c.insertVertex(k,null,"Start",0,0,80,30,"ellipse"),l(m)}finally{c.getModel().endUpdate()}var n;
"horizontalTree"==f?(n=new mxCompactTreeLayout(c),n.edgeRouting=!1,n.levelDistance=30,g="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==f?(n=new mxCompactTreeLayout(c,!1),n.edgeRouting=!1,n.levelDistance=30,g="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"verticalFlow"==f?n=new mxHierarchicalLayout(c,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?n=new mxHierarchicalLayout(c,mxConstants.DIRECTION_WEST):"organic"==f?(n=new mxFastOrganicLayout(c,!1),n.forceConstant=80):"circle"==f&&(n=
-new mxCircleLayout(c));if(null!=n){var p=function(a,b){c.getModel().beginUpdate();try{null!=a&&a(),n.execute(c.getDefaultParent(),m)}catch(y){throw y;}finally{var d=new mxMorphing(c);d.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=b&&b()}));d.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,e){q.apply(this,arguments);p()};c.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};c.connectionHandler.addListener(mxEvent.CONNECT,
+new mxCircleLayout(c));if(null!=n){var p=function(a,b){c.getModel().beginUpdate();try{null!=a&&a(),n.execute(c.getDefaultParent(),m)}catch(A){throw A;}finally{var d=new mxMorphing(c);d.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=b&&b()}));d.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,e){q.apply(this,arguments);p()};c.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};c.connectionHandler.addListener(mxEvent.CONNECT,
function(){p()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(c.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&d.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){c.clearCellOverlays();var d=a.editor.graph.getFreeInsertPoint(),d=a.editor.graph.importCells(c.getModel().getChildren(c.getDefaultParent()),d.x,d.y),e=a.editor.graph.view,f=e.getBounds(d);
f.x-=e.translate.x;f.y-=e.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(d);null!=b.parentNode&&(c.destroy(),b.parentNode.removeChild(b));a.hideDialog()});d.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(t)};this.container=d};
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+
@@ -7354,21 +7355,21 @@ a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){g.value=a.targ
f(g.value,k.value)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(a,c,f,d){function b(){if(d)f||a.hideDialog(),d(t,p.value);else{var b=p.value;if(null!=b&&0<b.length){var c=a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null;a.pickFolder(c,function(c){a.createFile(b,t,null!=q&&0<q.length?q:null,null,function(){a.hideDialog()},null,c)},c!=App.MODE_GOOGLE)}}}function e(a,
b,c){null!=u&&(u.style.backgroundColor="transparent",u.style.border="1px solid transparent");t=b;q=c;u=a;u.style.backgroundColor="#e6eff8";u.style.border="1px solid #ccd9ea"}function g(a,c,d,f,k){var g=document.createElement("div");g.className="geTemplate";g.style.height="140px";g.style.width="140px";null!=f&&0<f.length&&g.setAttribute("title",f);if(null!=a&&0<a.length){a.substring(0,a.length-4);g.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";g.style.backgroundPosition=
"center center";g.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(g,"click",function(d){v.setAttribute("disabled","disabled");g.style.backgroundColor="transparent";g.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(v.removeAttribute("disabled"),e(g,a.getText(),c),l&&b())}))});mxEvent.addListener(g,"dblclick",function(a){l=!0})}else g.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+
-mxResources.get(d)+"</td></tr></table>",k&&e(g),mxEvent.addListener(g,"click",function(a){e(g)}),mxEvent.addListener(g,"dblclick",function(a){b()});x.appendChild(g)}function k(){function a(){for(var a=!0;b<A.length&&(a||0!=mxUtils.mod(b,30));)a=A[b++],g(a.url,a.libs,a.title,a.tooltip,a.select),a=!1}var b=0;mxEvent.addListener(x,"scroll",function(b){x.scrollTop+x.clientHeight>=x.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in y){var e=document.createElement("div"),f=mxResources.get(d),
-k=y[d];null==f&&(f=d.substring(0,1).toUpperCase()+d.substring(1));18<f.length&&(f=f.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",f+" ("+k.length+")");mxUtils.write(e,e.getAttribute("title"));z.appendChild(e);null==c&&(c=e,c.style.backgroundColor="#ebf2f9");(function(d,f){mxEvent.addListener(e,"click",function(){c!=f&&(c.style.backgroundColor="",c=f,c.style.backgroundColor=
-"#ebf2f9",x.scrollTop=0,x.innerHTML="",b=0,A=y[d],a())})})(d,e)}a()}f=null!=f?f:!0;var l=document.createElement("div");l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="46px";l.appendChild(m);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":
+mxResources.get(d)+"</td></tr></table>",k&&e(g),mxEvent.addListener(g,"click",function(a){e(g)}),mxEvent.addListener(g,"dblclick",function(a){b()});x.appendChild(g)}function k(){function a(){for(var a=!0;b<z.length&&(a||0!=mxUtils.mod(b,30));)a=z[b++],g(a.url,a.libs,a.title,a.tooltip,a.select),a=!1}var b=0;mxEvent.addListener(x,"scroll",function(b){x.scrollTop+x.clientHeight>=x.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in A){var e=document.createElement("div"),f=mxResources.get(d),
+k=A[d];null==f&&(f=d.substring(0,1).toUpperCase()+d.substring(1));18<f.length&&(f=f.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",f+" ("+k.length+")");mxUtils.write(e,e.getAttribute("title"));y.appendChild(e);null==c&&(c=e,c.style.backgroundColor="#ebf2f9");(function(d,f){mxEvent.addListener(e,"click",function(){c!=f&&(c.style.backgroundColor="",c=f,c.style.backgroundColor=
+"#ebf2f9",x.scrollTop=0,x.innerHTML="",b=0,z=A[d],a())})})(d,e)}a()}f=null!=f?f:!0;var l=document.createElement("div");l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="46px";l.appendChild(m);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_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&f&&m.appendChild(n);f&&mxUtils.write(m,(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);var p=document.createElement("input");p.setAttribute("value",a.defaultFilename+n);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width=c?"220px":"450px";this.init=function(){f&&(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",
-!1,null))};f&&m.appendChild(p);var q=null,t=null,u=null,v=mxUtils.button(mxResources.get("create"),function(){b()});v.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 z=document.createElement("div");z.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
-f||(z.style.top="40px");var y={},B=1;y.basic=[{title:"blankDiagram",select:!0}];var A=y.basic;if(!c){l.appendChild(z);l.appendChild(x);var C=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!C){C=!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=y[b];null==c&&(B++,c=[],y[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
+!1,null))};f&&m.appendChild(p);var q=null,t=null,u=null,v=mxUtils.button(mxResources.get("create"),function(){b()});v.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 y=document.createElement("div");y.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
+f||(y.style.top="40px");var A={},B=1;A.basic=[{title:"blankDiagram",select:!0}];var z=A.basic;if(!c){l.appendChild(y);l.appendChild(x);var C=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!C){C=!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=A[b];null==c&&(B++,c=[],A[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
tooltip:a.getAttribute("url")})}}a=a.nextSibling}k()}})}mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&b()});m=document.createElement("div");m.style.marginTop=c?"4px":"16px";m.style.textAlign="right";m.style.position="absolute";m.style.left="40px";m.style.bottom="30px";m.style.right="40px";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);if(!c&&!a.isOffline()&&f&&null==d){var E=mxUtils.button(mxResources.get("help"),
function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});E.className="geBtn";m.appendChild(E)}c||"1"==urlParams.embed||(c=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()}),c.className="geBtn",m.appendChild(c));m.appendChild(v);a.editor.cancelFirst||null!=d||m.appendChild(n);l.appendChild(m);this.container=l},CreateDialog=function(a,c,f,d,b,e,g,k,l,m,n,p){function q(b,d,e,f){function k(){mxEvent.addListener(l,"click",function(){var b=e;if(g){var d=x.value,f=d.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>f){var b=null!=b?b:B.value,k="";b==App.MODE_GOOGLE?k=a.drive.extension:b==App.MODE_GITHUB?k=
a.gitHub.extension:b==App.MODE_DROPBOX?k=a.dropbox.extension:b==App.MODE_ONEDRIVE?k=a.oneDrive.extension:b==App.MODE_DEVICE&&(k=".xml");0<=f&&(d=d.substring(0,f));x.value=d+k}}t(e)})}var l=document.createElement("a");l.style.overflow="hidden";var m=document.createElement("img");m.src=b;m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.width="60px";m.style.height="60px";m.style.paddingBottom="6px";l.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";l.className="geBaseButton";
l.style.position="relative";l.style.margin="4px";l.style.padding="8px 8px 10px 8px";l.style.whiteSpace="nowrap";l.appendChild(m);mxClient.IS_QUIRKS&&(l.style.cssFloat="left",l.style.zoom="1");l.style.color="gray";l.style.fontSize="11px";var n=document.createElement("div");l.appendChild(n);mxUtils.write(n,d);if(null!=f&&null==a[f]){m.style.visibility="hidden";mxUtils.setOpacity(n,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(l);var v=window.setTimeout(function(){null==a[f]&&(q.stop(),l.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[f]&&(window.clearTimeout(v),mxUtils.setOpacity(n,100),m.style.visibility="",q.stop(),k())}))}else k();z.appendChild(l);++y==p&&(mxUtils.br(z),y=0)}function t(b){var c=x.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),f(c,b)}g=null!=g?g:!0;k=null!=k?k:!0;p=null!=p?p:3;var u=document.createElement("div");null==
+top:"40%",zIndex:2E9});q.spin(l);var v=window.setTimeout(function(){null==a[f]&&(q.stop(),l.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[f]&&(window.clearTimeout(v),mxUtils.setOpacity(n,100),m.style.visibility="",q.stop(),k())}))}else k();y.appendChild(l);++A==p&&(mxUtils.br(y),A=0)}function t(b){var c=x.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),f(c,b)}g=null!=g?g:!0;k=null!=k?k:!0;p=null!=p?p:3;var u=document.createElement("div");null==
d&&a.addLanguageMenu(u);var v=document.createElement("h2");mxUtils.write(v,b||mxResources.get("create"));v.style.marginTop="0px";v.style.marginBottom="24px";u.appendChild(v);mxUtils.write(u,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",c);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,
-null)};u.appendChild(x);mxUtils.br(u);var z=document.createElement("div");z.style.textAlign="center";var y=0;z.style.marginTop="6px";u.appendChild(z);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(b,mxResources.get("googleDrive")),B.appendChild(b),q(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
+null)};u.appendChild(x);mxUtils.br(u);var y=document.createElement("div");y.style.textAlign="center";var A=0;y.style.marginTop="6px";u.appendChild(y);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(b,mxResources.get("googleDrive")),B.appendChild(b),q(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
"drive")),null!=a.gitHub&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GITHUB),mxUtils.write(b,mxResources.get("github")),B.appendChild(b),q(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(b,mxResources.get("dropbox")),B.appendChild(b),a.mode==App.MODE_DROPBOX&&b.setAttribute("selected","selected"),q(IMAGE_PATH+
"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),"function"===typeof window.OneDriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(b,mxResources.get("oneDrive")),B.appendChild(b),a.mode==App.MODE_ONEDRIVE&&b.setAttribute("selected","selected"),q(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&
!mxClient.IS_IOS)b=document.createElement("option"),b.setAttribute("value",App.MODE_DEVICE),mxUtils.write(b,mxResources.get("device")),B.appendChild(b),a.mode!=App.MODE_DEVICE&&k||b.setAttribute("selected","selected"),n&&q(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);k&&isLocalStorage&&"0"!=urlParams.browser&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_BROWSER),mxUtils.write(k,mxResources.get("browser")),B.appendChild(k),a.mode==App.MODE_BROWSER&&
@@ -7386,61 +7387,44 @@ ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=
a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){p.click()});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(a){ImageDialog.filePicked(a)}).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(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),q.className="geBtn",f.appendChild(q)));mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&n(l.value)});q=mxUtils.button(mxResources.get("apply"),function(){n(l.value)});q.className="geBtn gePrimaryBtn";f.appendChild(q);a.editor.cancelFirst||f.appendChild(c);Graph.fileSupport&&(f.style.marginTop="120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",
-k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k};
-PrintDialog.prototype.create=function(a,c){function f(){t.value=Math.max(1,Math.min(k,Math.max(parseInt(t.value),parseInt(q.value))));q.value=Math.max(1,Math.min(k,Math.min(parseInt(t.value),parseInt(q.value))))}function d(c){function d(a,b,c){var d=a.getGraphBounds(),f=0,k=0,g=L.get(),l=1/a.pageScale,m=z.checked;if(m)var l=parseInt(J.value),n=parseInt(I.value),l=Math.min(g.height*n/(d.height/a.view.scale),g.width*l/(d.width/a.view.scale));else l=parseInt(x.value)/(100*a.pageScale),isNaN(l)&&(e=1/
-a.pageScale,x.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*e);g.height=Math.ceil(g.height*e);l*=e;!m&&a.pageVisible?(d=a.getPageLayout(),f-=d.x*g.width,k-=d.y*g.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,l,g,0,f,k,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var p=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=p.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,
-null,c,!0)}else{g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=m;b.appendGraph(a,l,f,k,c,!0)}return b}var e=parseInt(M.value)/100;isNaN(e)&&(e=1,M.value="100 %");var e=.75*e,f=q.value,k=t.value,g=!n.checked,m=null;g&&(g=f==l&&k==l);if(!g&&null!=a.pages&&a.pages.length){var p=0,g=a.pages.length-1;n.checked||(p=parseInt(f)-1,g=parseInt(k)-1);for(var v=p;v<=g;v++){var u=a.pages[v],f=u==a.currentPage?b:null;if(null==f){var f=a.createTemporaryGraph(b.getStylesheet()),
-k=!0,p=!1,y=null,A=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(k=u.viewState.pageVisible,p=u.viewState.mathEnabled,y=u.viewState.background,A=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(p="0"!=u.mapping.diagramMap.get("mathEnabled"),y=u.mapping.diagramMap.get("background"),A=u.mapping.diagramMap.get("backgroundImage"),A=null!=A&&0<A.length?JSON.parse(A):null);f.background=y;f.backgroundImage=null!=A?new mxImage(A.src,
-A.width,A.height):null;f.pageVisible=k;f.mathEnabled=p;var B=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?v+1:B.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(u);f.model.setRoot(u.root)}m=d(f,m,v!=g);f!=b&&f.container.parentNode.removeChild(f.container)}}else m=d(b);m.mathEnabled&&(g=m.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),
-g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),
-g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.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 b=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var k=1,l=1,m=document.createElement("div");
-m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","all");n.setAttribute("type","radio");n.setAttribute("name","pages-printdialog");m.appendChild(n);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var p=n.cloneNode(!0);n.setAttribute("checked","checked");p.setAttribute("value","range");
-m.appendChild(p);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";m.appendChild(q);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var t=q.cloneNode(!0);m.appendChild(t);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(t,
-"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",f);mxEvent.addListener(t,"change",f);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){l=g+1;q.value=l;t.value=l;break}q.setAttribute("max",k);t.setAttribute("max",k);1<k&&e.appendChild(m);var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type",
-"radio");v.setAttribute("name","printZoom");u.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));u.appendChild(g);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(){v.checked=!0});e.appendChild(u);var m=m.cloneNode(!1),z=v.cloneNode(!0);z.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");
-g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(z);m.appendChild(g);u=document.createElement("table");u.style.display="inline-block";var y=document.createElement("tbody"),B=document.createElement("tr"),A=B.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),F=C.cloneNode(!0),D=C.cloneNode(!0),K=C.cloneNode(!0),H=C.cloneNode(!0);C.style.textAlign="right";D.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var J=document.createElement("input");
-J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";E.appendChild(J);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));F.appendChild(g);mxUtils.write(D,mxResources.get("fitToBy"));var I=J.cloneNode(!0);K.appendChild(I);mxEvent.addListener(J,"focus",function(){z.checked=!0});mxEvent.addListener(I,"focus",function(){z.checked=!0});g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsDown"));H.appendChild(g);B.appendChild(C);B.appendChild(E);B.appendChild(F);A.appendChild(D);A.appendChild(K);A.appendChild(H);y.appendChild(B);y.appendChild(A);u.appendChild(y);m.appendChild(u);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var L=PageSetupDialog.addPageFormatPanel(g,
-"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="60px";m.appendChild(M);e.appendChild(m);g=document.createElement("div");g.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&&g.appendChild(m);a.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",g.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),u.className="geBtn",g.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});u.className=
-"geBtn gePrimaryBtn";g.appendChild(u);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};
-var LinkDialog=function(a,c,f,d){function b(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);m.appendChild(c)}var e=document.createElement("div");mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor=
-"transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";mxClient.IS_VML||(g.style.paddingRight="20px");var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.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('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});g.appendChild(k);g.appendChild(c);e.appendChild(g);var l=mxUtils.button(f,function(){a.hideDialog();
-d(k.value,LinkDialog.selectedDocs)});l.style.verticalAlign="middle";l.className="geBtn gePrimaryBtn";this.init=function(){k.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null);if(Graph.fileSupport){var b=e.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")&&(k.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.click());a.stopPropagation();a.preventDefault()}),!1)}};var m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);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);k.value=b}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&b(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&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){k.value=a[0].link}})});
-"undefined"!=typeof WL&&"undefined"!=typeof WL.fileDialog&&null!=a.oneDrive&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){WL.fileDialog({mode:"open",select:"single"}).then(function(a){null!=a&&null!=a.data&&null!=a.data.files&&0<a.data.files.length&&(k.value=a.data.files[0].link)},function(a){})});null!=a.gitHub&&b(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("/");k.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a}})});mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(k.value,LinkDialog.selectedDocs))});m.appendChild(l);a.editor.cancelFirst||m.appendChild(f);e.appendChild(m);this.container=e},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.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");c.appendChild(f);mxUtils.br(c);f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color="#505050";c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,
-"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(f);var d=document.createElement("input");d.setAttribute("type",
-"text");d.style.marginTop="6px";d.style.width="600px";var b=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(g.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(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
-"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
-mxEvent.addListener(d,"change",function(){0<d.value.length&&0<e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;f=document.createElement("p");f.style.marginTop=
-"14px";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("feedback"));c.appendChild(f);var l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));
-c.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst?(f.appendChild(k),f.appendChild(b)):(f.appendChild(b),f.appendChild(k));c.appendChild(f);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k},LinkDialog=function(a,c,f,d){function b(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);m.appendChild(c)}var e=document.createElement("div");mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";mxClient.IS_VML||(g.style.paddingRight="20px");var k=
+document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.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('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});g.appendChild(k);g.appendChild(c);e.appendChild(g);var l=mxUtils.button(f,function(){a.hideDialog();d(k.value,LinkDialog.selectedDocs)});l.style.verticalAlign="middle";l.className="geBtn gePrimaryBtn";this.init=function(){k.focus();
+mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null);if(Graph.fileSupport){var b=e.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")&&(k.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.click());a.stopPropagation();a.preventDefault()}),!1)}};var m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);
+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);k.value=b}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&b(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&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){k.value=a[0].link}})});"undefined"!=typeof WL&&"undefined"!=typeof WL.fileDialog&&null!=a.oneDrive&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){WL.fileDialog({mode:"open",
+select:"single"}).then(function(a){null!=a&&null!=a.data&&null!=a.data.files&&0<a.data.files.length&&(k.value=a.data.files[0].link)},function(a){})});null!=a.gitHub&&b(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("/");k.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a}})});mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(k.value,LinkDialog.selectedDocs))});
+m.appendChild(l);a.editor.cancelFirst||m.appendChild(f);e.appendChild(m);this.container=e},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.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");c.appendChild(f);mxUtils.br(c);f=document.createElement("small");f.innerHTML="v "+
+EditorUi.VERSION;f.style.color="#505050";c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),f=document.createElement("div");
+mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(f);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="600px";var b=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(g.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(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):
+a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(d,"change",function(){0<d.value.length&&0<e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});
+mxEvent.addListener(d,"keyup",function(){0<d.value.length&&e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);
+mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("feedback"));c.appendChild(f);var l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));c.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),
+function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst?(f.appendChild(k),f.appendChild(b)):(f.appendChild(b),f.appendChild(k));c.appendChild(f);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,c){var f=document.createElement("div"),d=document.createElement("h3");d.style.marginTop="0px";mxUtils.write(d,mxResources.get("revisionHistory"));f.appendChild(d);var b=document.createElement("div");b.style.position="absolute";b.style.overflow="auto";b.style.width="170px";b.style.height="378px";f.appendChild(b);var e=document.createElement("div");e.style.position="absolute";e.style.border="1px solid lightGray";e.style.left="199px";e.style.width="470px";e.style.height=
"376px";e.style.overflow="hidden";mxEvent.disableContextMenu(e);f.appendChild(e);var g=new Graph(e);g.setEnabled(!1);g.setPanning(!0);g.panningHandler.ignoreCell=!0;g.panningHandler.useLeftButtonForPanning=!0;g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;var k=0,l=null,m=0,n=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a&&null!=l&&null!=l[m]?l[m].getAttribute("name"):"pagenumber"==a?m+1:n.apply(this,arguments)};g.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-g.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(g.container)}));var p=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(),t=null,u=null,v=null,x=null,z=mxUtils.button("",function(){null!=v&&g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));
-z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var y=mxUtils.button("",function(){null!=v&&g.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var B=mxUtils.button("",function(){null!=v&&(g.maxFitScale=8,g.fit(8),g.center())});B.className=
-"geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var A=mxUtils.button("",function(){null!=v&&(g.zoomActual(),g.center())});A.className="geSprite geSprite-actualsize";A.setAttribute("title",mxResources.get("actualSize"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var C=
+g.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(g.container)}));var p=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(),t=null,u=null,v=null,x=null,y=mxUtils.button("",function(){null!=v&&g.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 A=mxUtils.button("",function(){null!=v&&g.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var B=mxUtils.button("",function(){null!=v&&(g.maxFitScale=8,g.fit(8),g.center())});B.className=
+"geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var z=mxUtils.button("",function(){null!=v&&(g.zoomActual(),g.center())});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var C=
document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=v){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(v.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"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=v&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&q.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)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var D=document.createElement("select");D.setAttribute("disabled","disabled");D.style.maxWidth="80px";D.style.position="relative";D.style.top="-2px";D.style.verticalAlign="bottom";D.style.marginRight="6px";D.style.display="none";var K=null;mxEvent.addListener(D,"change",function(a){null!=
K&&(K(a),mxEvent.consume(a))});var H=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=v&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(v.documentElement)),window.openWindow(a.getUrl()))});H.className="geBtn";H.setAttribute("disabled","disabled");var J=mxUtils.button(mxResources.get("show"),function(){null!=u&&window.open(u.getUrl())});J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");d=document.createElement("div");
d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var L=null;if(null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile)e.style.display="none",I.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));
-else if(null!=c&&0<c.length){e.style.cursor="move";var M=document.createElement("table");M.style.border="1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var Q=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var O=c.length-1;0<=O;O--){var G=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){var n=function(b){p.stop();var c=mxUtils.parseXml(b),
+else if(null!=c&&0<c.length){e.style.cursor="move";var M=document.createElement("table");M.style.border="1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var Q=document.createElement("tbody"),X=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var N=c.length-1;0<=N;N--){var G=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){var n=function(b){p.stop();var c=mxUtils.parseXml(b),
n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){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";e.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center();return a};D.style.display="none";D.innerHTML="";v=c;x=b;l=parseSelectFunction=null;m=0;if("mxfile"==
n.nodeName){c=n.getElementsByTagName("diagram");l=[];for(b=0;b<c.length;b++)l.push(c[b]);m=Math.min(k,l.length-1);0<l.length&&t(l[m]);if(1<l.length)for(D.removeAttribute("disabled"),D.style.display="",b=0;b<l.length;b++)c=document.createElement("option"),mxUtils.write(c,l[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==m&&c.setAttribute("selected","selected"),D.appendChild(c);K=function(){m=k=parseInt(D.value);t(l[k])}}else u(n);C.innerHTML="";mxUtils.write(C,
-d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));z.removeAttribute("disabled");y.removeAttribute("disabled");B.removeAttribute("disabled");A.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(z,60);mxUtils.setOpacity(y,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(A,60)}else D.style.display=
-"none",D.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var G=document.createElement("td");G.style.padding="6px";G.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(G,mxResources.get("current")):d.toDateString()===W?mxUtils.write(G,d.toLocaleTimeString()):mxUtils.write(G,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(G);
+d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));y.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");z.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(y,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(z,60)}else D.style.display=
+"none",D.innerHTML="",C.innerHTML="",mxUtils.write(C,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";b==c[c.length-1]?mxUtils.write(I,mxResources.get("current")):d.toDateString()===X?mxUtils.write(I,d.toLocaleTimeString()):mxUtils.write(I,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(I);
f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){u!=b&&(p.stop(),null!=t&&(t.style.backgroundColor=""),u=b,t=f,t.style.backgroundColor="#ebf2f9",x=v=null,C.removeAttribute("title"),C.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),F.setAttribute("disabled","disabled"),E.setAttribute("disabled",
-"disabled"),z.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),mxUtils.setOpacity(z,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(A,20),p.spin(e),b.getXml(function(a){u==b&&n(a)},function(a){p.stop();D.style.display="none";D.innerHTML="";C.innerHTML="";mxUtils.write(C,
-mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){J.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Q.appendChild(f)}return f}(c[O]);null!=G&&O==c.length-1&&(L=G)}M.appendChild(Q);b.appendChild(M)}else e.style.display="none",I.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=L&&L.click()};b=mxUtils.button(mxResources.get("close"),
-function(){a.hideDialog()});b.className="geBtn";I.appendChild(D);I.appendChild(z);I.appendChild(y);I.appendChild(A);I.appendChild(B);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(E),d.appendChild(H),d.appendChild(F),d.appendChild(J)):(d.appendChild(E),d.appendChild(H),d.appendChild(F),d.appendChild(J),d.appendChild(b));f.appendChild(d);f.appendChild(I);f.appendChild(C);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),l=document.createElement("div");
+"disabled"),y.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),mxUtils.setOpacity(y,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(z,20),p.spin(e),b.getXml(function(a){u==b&&n(a)},function(a){p.stop();D.style.display="none";D.innerHTML="";C.innerHTML="";mxUtils.write(C,
+mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){J.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Q.appendChild(f)}return f}(c[N]);null!=G&&N==c.length-1&&(L=G)}M.appendChild(Q);b.appendChild(M)}else e.style.display="none",I.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=L&&L.click()};b=mxUtils.button(mxResources.get("close"),
+function(){a.hideDialog()});b.className="geBtn";I.appendChild(D);I.appendChild(y);I.appendChild(A);I.appendChild(z);I.appendChild(B);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(E),d.appendChild(H),d.appendChild(F),d.appendChild(J)):(d.appendChild(E),d.appendChild(H),d.appendChild(F),d.appendChild(J),d.appendChild(b));f.appendChild(d);f.appendChild(I);f.appendChild(C);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),l=document.createElement("div");
l.style.marginTop="0px";mxUtils.write(l,c);k.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.marginTop="10px";m.style.width="640px";m.style.height="386px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);k.appendChild(m);var n=new Graph(m);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(f);
var p=a.editor.extractGraphModel(c.documentElement,!0),q=0,t=null,u=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[q]?t[q].getAttribute("name"):"pagenumber"==a?q+1:u.apply(this,arguments)};n.getLinkForCell=function(){return null};c=mxUtils.button("",function(){n.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);f=mxUtils.button("",
function(){n.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);l=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});l.className="geSprite geSprite-fit";l.setAttribute("title",mxResources.get("fit"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);var v=mxUtils.button("",function(){n.zoomActual();n.center()});
@@ -7470,8 +7454,8 @@ for(var f=0;f<c.entries.length;f++)(function(c){var d=l.cloneNode(!1);d.style.cu
"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=c.style.width,f.style.paddingTop="12px");var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)c=document.createElement("span"),c.style.paddingRight="20px",c.appendChild(n),mxUtils.write(c," "+mxResources.get("rememberThisSetting")),
n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(c,"click",function(a){mxEvent.getSource(a)!=n&&(n.checked=!n.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(c.style.position="relative",c.style.top="-6px"),f.appendChild(c);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<k.length;c++){var d=k[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),
n.checked,!0)});p.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),t=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";var u=document.createElement("tr");q.style.width="100%";c=document.createElement("td");var p=document.createElement("td"),v=document.createElement("td"),x=mxUtils.bind(this,function(b,c,d){var e=document.createElement("input");e.type="checkbox";q.appendChild(e);e.checked=a.sidebar.isEntryVisible(d);var f=document.createElement("span");
-mxUtils.write(f,c);c=document.createElement("div");c.style.display="block";c.appendChild(e);c.appendChild(f);mxEvent.addListener(f,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return e.checked?d:null}});u.appendChild(c);u.appendChild(p);u.appendChild(v);t.appendChild(u);q.appendChild(t);for(var k=[],z=0,m=0;m<f.length;m++)for(t=0;t<f[m].entries.length;t++)z++;for(var y=[c,p,v],B=0,m=0;m<f.length;m++)(function(a){for(var b=0;b<a.entries.length;b++){var c=
-a.entries[b];k.push(x(y[Math.floor(B/(z/3))],c.title,c.id));B++}})(f[m]);d.appendChild(q);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,f.appendChild(n),c=document.createElement("span"),mxUtils.write(c," "+mxResources.get("rememberThisSetting")),f.appendChild(c),mxEvent.addListener(c,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));
+mxUtils.write(f,c);c=document.createElement("div");c.style.display="block";c.appendChild(e);c.appendChild(f);mxEvent.addListener(f,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return e.checked?d:null}});u.appendChild(c);u.appendChild(p);u.appendChild(v);t.appendChild(u);q.appendChild(t);for(var k=[],y=0,m=0;m<f.length;m++)for(t=0;t<f[m].entries.length;t++)y++;for(var A=[c,p,v],B=0,m=0;m<f.length;m++)(function(a){for(var b=0;b<a.entries.length;b++){var c=
+a.entries[b];k.push(x(A[Math.floor(B/(y/3))],c.title,c.id));B++}})(f[m]);d.appendChild(q);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,f.appendChild(n),c=document.createElement("span"),mxUtils.write(c," "+mxResources.get("rememberThisSetting")),f.appendChild(c),mxEvent.addListener(c,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));
d.appendChild(f);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<k.length;c++){var d=k[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",n.checked);a.hideDialog()});p.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}a.editor.cancelFirst?(f.appendChild(c),f.appendChild(p)):
(f.appendChild(p),f.appendChild(c));d.appendChild(f);this.container=d},PluginsDialog=function(a){function c(){if(0==b.length)d.innerHTML=mxResources.get("noPlugins");else{d.innerHTML="";for(var e=0;e<b.length;e++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var k=document.createElement("span");k.className="geSprite geSprite-delete";k.style.position="relative";k.style.cursor="pointer";k.style.top="5px";k.style.marginRight="4px";k.style.display="inline-block";f.appendChild(k);mxUtils.write(f,
b[e]);d.appendChild(f);mxUtils.br(d);mxEvent.addListener(k,"click",function(d){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+b[d]+'"?',function(){b.splice(d,1);c()})}}(e))}}}var f=document.createElement("div"),d=document.createElement("div");d.style.height="120px";d.style.overflow="auto";var b=mxSettings.getPlugins().slice();f.appendChild(d);c();var e=mxUtils.button(mxResources.get("add"),function(){var d="",e=urlParams.p;if(null!=e&&0<e.length){for(var f=e.split(";"),e=
@@ -7483,34 +7467,34 @@ k.appendChild(l);k.appendChild(m);g.appendChild(k);k=document.createElement("tr"
k=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=1==c.length?mxUtils.getValue(f.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(u);k.appendChild(l);k.appendChild(m);g.appendChild(k);e.appendChild(g);b.appendChild(e);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=
mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var d=f.getCellGeometry(c[b]);null!=d&&(d=d.clone(),f.isCellMovable(c[b])&&(0<mxUtils.trim(n.value).length&&(d.x=Number(n.value)),0<mxUtils.trim(p.value).length&&(d.y=Number(p.value))),f.isCellResizable(c[b])&&(0<mxUtils.trim(q.value).length&&(d.width=Number(q.value)),0<mxUtils.trim(t.value).length&&(d.height=Number(t.value))),f.getModel().setGeometry(c[b],d));0<mxUtils.trim(u.value).length&&
f.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[c[b]])}}finally{f.getModel().endUpdate()}});mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&v.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(d),e.appendChild(v)):(e.appendChild(v),e.appendChild(d));b.appendChild(e);this.container=b},LibraryDialog=function(a,c,f,d,b,e){function g(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 k(b,c,d,e,f,l,m,p,q){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=m||null==v[b]){var z=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));I.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};t.style.backgroundImage=
+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 k(b,c,d,e,f,l,m,p,q){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=m||null==v[b]){var y=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));I.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};t.style.backgroundImage=
"";u.style.display="none";var C=f,D=l;if(f>a.maxImageSize||l>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=F;l*=F}C>D?(D=Math.round(100*D/C),C=100):(C=Math.round(100*C/D),D=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 H=document.createElement("img");H.setAttribute("src",B.convert(b));H.style.width=C+"px";H.style.height=D+"px";H.style.margin="10px";H.style.paddingBottom=Math.floor((100-D)/2)+"px";H.style.paddingLeft=Math.floor((100-C)/2)+"px";E.appendChild(H)}else if(null!=m){var K=a.stringToCells(a.editor.graph.decompress(m.xml));0<K.length&&(a.sidebar.createThumb(K,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.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(a){mxEvent.consume(a)});null==b&&null!=m&&(J.style.position="relative");(function(a,b,c){mxEvent.addListener(J,"click",function(d){v[b]=null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==b||null!=n[e].xml&&null!=c&&n[e].xml==
c.xml){n.splice(e,1);break}E.parentNode.removeChild(a);0==n.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(d)});mxEvent.addListener(J,"dblclick",function(a){mxEvent.consume(a)})})(E,b,m);E.appendChild(J);E.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow=
-"hidden";I.style.textAlign="center";var L=null;null!=b?(L={data:b,w:f,h:l,title:q},null!=p&&(L.aspect=p),v[b]=H,n.push(L)):null!=m&&(m.aspect="fixed",n.push(m),L=m);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(a))});z();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<
-document.documentMode)){var c=new FilenameDialog(a,L.title||"",mxResources.get("ok"),function(a){null!=a&&(L.title=a,z())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==L.title||0==L.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",
-!1,null);y=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";L.title=I.innerHTML;z()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",K);mxEvent.addListener(E,"dblclick",K);t.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=m&&(J.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=m.xml&&a.dataTransfer.setData("Text",m.xml);x=g(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);J.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility="",I.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else A||(A=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(a.spinner.stop(),C=mxUtils.parseXml(b),"mxlibrary"==C.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(C.documentElement));
-if(null!=D&&0<D.length)for(var M=0;M<D.length;M++)null!=D[M].xml?k(null,null,0,0,0,0,D[M]):k(D[M].data,null,0,0,D[M].w,D[M].h,null,"fixed",D[M].title);f=!0}else if("mxfile"==C.documentElement.nodeName){for(var Q=C.documentElement.getElementsByTagName("diagram"),M=0;M<Q.length;M++){var D=mxUtils.getTextContent(Q[M]),K=a.stringToCells(a.editor.graph.decompress(D)),ba=a.editor.graph.getBoundingBoxFromGeometry(K);k(null,null,0,0,0,0,{xml:D,w:ba.width,h:ba.height})}f=!0}}catch(T){}f||(a.spinner.stop(),
-a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(T){}return null}function l(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();A=!1;z=g(b);if(null!=x)null!=z&&z<t.children.length?(n.splice(z>x?z-1:z,0,n.splice(x,1)[0]),t.insertBefore(t.children[x],t.children[z])):(n.push(n.splice(x,1)[0]),t.appendChild(t.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,
-0,0,a.maxImageSize,C(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){k(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];f=document.createElement("div");f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace=
-"nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==b||b.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==b||b.isRenamable())q.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",
-!1,null)};p.appendChild(q);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==n.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"));f.appendChild(u);var v={},x=null,z=null,y=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",c);mxEvent.addListener(t,"pointerdown",c);mxEvent.addListener(t,"touchstart",c);var B=new mxUrlConverter,A=!1;if(null!=d)for(c=0;c<d.length;c++)p=d[c],k(p.data,null,0,0,
-p.w,p.h,p,p.aspect,p.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 C=function(b){return function(c,d,e,f,g,l,m,n,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&&(k(c.responseText,d,e,f,g,l,m,"fixed",mxEvent.isAltDown(b)?
-null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(k(c,d,e,f,g,l,m,"fixed",mxEvent.isAltDown(b)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",l);mxEvent.addListener(t,"drop",m);mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",m);f.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);window.chrome&&chrome.app&&chrome.app.runtime?q.setAttribute("disabled","disabled"):(p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(n),c=q.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")}),p.setAttribute("id","btnDownload"),p.className="geBtn",d.appendChild(p));var E=document.createElement("input");E.setAttribute("multiple","multiple");E.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(E,"change",function(b){A=!1;a.importFiles(E.files,0,0,a.maxImageSize,function(a,c,d,e,f,k,g,l,m){C(b)(a,c,d,e,f,k,g,l,m);E.value=""});t.scrollTop=t.scrollHeight}),p=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);E.click()}),p.setAttribute("id",
-"btnAddImage"),p.className="geBtn",d.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=y&&(y(),y=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){A=!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))}k(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";d.appendChild(p);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,
-c,d,e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(q.value,n,b,e)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);f.appendChild(d);this.container=f},EditShapeDialog=function(a,c,f,d,b){d=null!=d?d:300;b=null!=b?b:120;var e,g,k=document.createElement("table"),l=document.createElement("tbody");k.style.cellPadding="4px";e=document.createElement("tr");g=
-document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";mxUtils.write(g,f);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=d-200+"px";m.style.height=b+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};g.appendChild(m);e.appendChild(g);g=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=b+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var n=new Graph(f);n.setEnabled(!1);var p=a.editor.graph.cloneCells([c])[0];n.addCells([p]);f=n.view.getState(p);var q="";null!=f.shape&&null!=f.shape.stencil&&(q=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(m,q||"");f=n.getGraphBounds();b=Math.min(160/f.width,(b-40)/f.height);n.view.scaleAndTranslate(b,
-20/b-f.x,20/b-f.y);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),
-f.className="geBtn",g.appendChild(f));var t=function(b,c,d){var e=m.value,f=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(f.documentElement),f=f.documentElement.getElementsByTagName("parsererror");if(null!=f&&0<f.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),f=!b.model.contains(c),!d||f||e!=q){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(f){var k=a.editor.graph.getInsertPoint();c.geometry.x=k.x;
-c.geometry.y=k.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(A){throw A;}finally{b.getModel().endUpdate()}f&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){t(n,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);a.editor.cancelFirst||g.appendChild(b);e.appendChild(g);l.appendChild(e);k.appendChild(l);this.container=
-k},CustomDialog=function(a,c,f,d,b,e){var g=document.createElement("div");g.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="right";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);if(!a.isOffline()&&null!=e){var l=mxUtils.button(mxResources.get("help"),function(){window.open(e)});l.className="geBtn";c.appendChild(l)}b=mxUtils.button(b||mxResources.get("ok"),
-function(){a.hideDialog();null!=f&&f()});c.appendChild(b);b.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);g.appendChild(c);this.cancelBtn=k;this.okButton=b;this.container=g};
+"hidden";I.style.textAlign="center";var L=null;null!=b?(L={data:b,w:f,h:l,title:q},null!=p&&(L.aspect=p),v[b]=H,n.push(L)):null!=m&&(m.aspect="fixed",n.push(m),L=m);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});y();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<
+document.documentMode)){var c=new FilenameDialog(a,L.title||"",mxResources.get("ok"),function(a){null!=a&&(L.title=a,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==L.title||0==L.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",
+!1,null);A=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";L.title=I.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",K);mxEvent.addListener(E,"dblclick",K);t.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=m&&(J.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=m.xml&&a.dataTransfer.setData("Text",m.xml);x=g(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);J.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility="",I.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(a.spinner.stop(),C=mxUtils.parseXml(b),"mxlibrary"==C.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(C.documentElement));
+if(null!=D&&0<D.length)for(var M=0;M<D.length;M++)null!=D[M].xml?k(null,null,0,0,0,0,D[M]):k(D[M].data,null,0,0,D[M].w,D[M].h,null,"fixed",D[M].title);f=!0}else if("mxfile"==C.documentElement.nodeName){for(var Q=C.documentElement.getElementsByTagName("diagram"),M=0;M<Q.length;M++){var D=mxUtils.getTextContent(Q[M]),K=a.stringToCells(a.editor.graph.decompress(D)),Z=a.editor.graph.getBoundingBoxFromGeometry(K);k(null,null,0,0,0,0,{xml:D,w:Z.width,h:Z.height})}f=!0}}catch(T){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(T){}return null}
+function l(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();z=!1;y=g(b);if(null!=x)null!=y&&y<t.children.length?(n.splice(y>x?y-1:y,0,n.splice(x,1)[0]),t.insertBefore(t.children[x],t.children[y])):(n.push(n.splice(x,1)[0]),t.appendChild(t.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(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){k(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];f=document.createElement("div");f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+
+":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==b||b.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==b||b.isRenamable())q.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);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==n.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"));f.appendChild(u);var v={},x=null,y=null,A=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",c);mxEvent.addListener(t,"pointerdown",c);mxEvent.addListener(t,"touchstart",c);var B=new mxUrlConverter,z=!1;if(null!=d)for(c=0;c<d.length;c++)p=d[c],k(p.data,null,0,0,p.w,p.h,p,p.aspect,p.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 C=function(b){return function(c,d,e,f,g,l,m,n,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&&(k(c.responseText,d,e,f,g,l,m,"fixed",mxEvent.isAltDown(b)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):
+(k(c,d,e,f,g,l,m,"fixed",mxEvent.isAltDown(b)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",l);mxEvent.addListener(t,"drop",m);mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",m);f.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&
+d.appendChild(c);window.chrome&&chrome.app&&chrome.app.runtime?q.setAttribute("disabled","disabled"):(p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(n),c=q.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")}),p.setAttribute("id","btnDownload"),p.className="geBtn",d.appendChild(p));
+var E=document.createElement("input");E.setAttribute("multiple","multiple");E.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(E,"change",function(b){z=!1;a.importFiles(E.files,0,0,a.maxImageSize,function(a,c,d,e,f,k,g,l,m){C(b)(a,c,d,e,f,k,g,l,m);E.value=""});t.scrollTop=t.scrollHeight}),p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);E.click()}),p.setAttribute("id","btnAddImage"),p.className="geBtn",d.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),
+function(){null!=A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){z=!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))}k(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";d.appendChild(p);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,c,d,e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=A&&
+(A(),A=null);this.saveBtnClickHandler(q.value,n,b,e)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);f.appendChild(d);this.container=f},EditShapeDialog=function(a,c,f,d,b){d=null!=d?d:300;b=null!=b?b:120;var e,g,k=document.createElement("table"),l=document.createElement("tbody");k.style.cellPadding="4px";e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";mxUtils.write(g,
+f);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=d-200+"px";m.style.height=b+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};g.appendChild(m);e.appendChild(g);g=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=
+b+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var n=new Graph(f);n.setEnabled(!1);var p=a.editor.graph.cloneCells([c])[0];n.addCells([p]);f=n.view.getState(p);var q="";null!=f.shape&&null!=f.shape.stencil&&(q=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(m,q||"");f=n.getGraphBounds();b=Math.min(160/f.width,(b-40)/f.height);n.view.scaleAndTranslate(b,20/b-f.x,20/b-f.y);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");
+g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),f.className="geBtn",g.appendChild(f));var t=function(b,c,d){var e=m.value,f=mxUtils.parseXml(e),
+e=mxUtils.getPrettyXml(f.documentElement),f=f.documentElement.getElementsByTagName("parsererror");if(null!=f&&0<f.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),f=!b.model.contains(c),!d||f||e!=q){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(f){var k=a.editor.graph.getInsertPoint();c.geometry.x=k.x;c.geometry.y=k.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(z){throw z;
+}finally{b.getModel().endUpdate()}f&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){t(n,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);a.editor.cancelFirst||g.appendChild(b);e.appendChild(g);l.appendChild(e);k.appendChild(l);this.container=k},CustomDialog=function(a,c,f,d,b,e){var g=document.createElement("div");g.appendChild(c);c=document.createElement("div");
+c.style.marginTop="16px";c.style.textAlign="right";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);if(!a.isOffline()&&null!=e){var l=mxUtils.button(mxResources.get("help"),function(){window.open(e)});l.className="geBtn";c.appendChild(l)}b=mxUtils.button(b||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f()});c.appendChild(b);b.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);
+g.appendChild(c);this.cancelBtn=k;this.okButton=b;this.container=g};
(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==":
@@ -7522,7 +7506,7 @@ Editor.configure=function(a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.
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 c=Editor.prototype.getGraphXml;
Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};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(z){}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"==
+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(y){}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 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 d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&
@@ -7558,8 +7542,25 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[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(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 t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return t.apply(this,arguments)}})();
-(function(){EditorUi.VERSION="6.6.4";EditorUi.compactUi="atlas"!=uiTheme;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=
+[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 t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return t.apply(this,arguments)};
+PrintDialog.prototype.create=function(a,b){function c(){v.value=Math.max(1,Math.min(g,Math.max(parseInt(v.value),parseInt(q.value))));q.value=Math.max(1,Math.min(g,Math.min(parseInt(v.value),parseInt(q.value))))}function d(b){function c(a,b,c){var e=a.getGraphBounds(),f=0,k=0,g=da.get(),l=1/a.pageScale,m=Q.checked;if(m)var l=parseInt(R.value),n=parseInt(V.value),l=Math.min(g.height*n/(e.height/a.view.scale),g.width*l/(e.width/a.view.scale));else l=parseInt(M.value)/(100*a.pageScale),isNaN(l)&&(d=
+1/a.pageScale,M.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);l*=d;!m&&a.pageVisible?(e=a.getPageLayout(),f-=e.x*g.width,k-=e.y*g.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,l,g,0,f,k,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var p=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=p.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,
+null,c,!0)}else{g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=m;b.appendGraph(a,l,f,k,c,!0)}return b}var d=parseInt(Z.value)/100;isNaN(d)&&(d=1,Z.value="100 %");var d=.75*d,f=q.value,k=v.value,g=!n.checked,m=null;g&&(g=f==l&&k==l);if(!g&&null!=a.pages&&a.pages.length){var p=0,g=a.pages.length-1;n.checked||(p=parseInt(f)-1,g=parseInt(k)-1);for(var t=p;t<=g;t++){var u=a.pages[t],f=u==a.currentPage?e:null;if(null==f){var f=a.createTemporaryGraph(e.getStylesheet()),
+k=!0,p=!1,x=null,y=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(k=u.viewState.pageVisible,p=u.viewState.mathEnabled,x=u.viewState.background,y=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(p="0"!=u.mapping.diagramMap.get("mathEnabled"),x=u.mapping.diagramMap.get("background"),y=u.mapping.diagramMap.get("backgroundImage"),y=null!=y&&0<y.length?JSON.parse(y):null);f.background=x;f.backgroundImage=null!=y?new mxImage(y.src,
+y.width,y.height):null;f.pageVisible=k;f.mathEnabled=p;var A=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?t+1:A.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(u);f.model.setRoot(u.root)}m=c(f,m,t!=g);f!=e&&f.container.parentNode.removeChild(f.container)}}else m=c(e);m.mathEnabled&&(g=m.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),
+g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),b&&(g.writeln("MathJax.Hub.Queue(function () {"),
+g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&b&&PrintDialog.printPreview(m)}var e=a.editor.graph,f=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,b||mxResources.get("print"));f.appendChild(k);var g=1,l=1,m=document.createElement("div");
+m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","all");n.setAttribute("type","radio");n.setAttribute("name","pages-printdialog");m.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));m.appendChild(k);mxUtils.br(m);var p=n.cloneNode(!0);n.setAttribute("checked","checked");p.setAttribute("value","range");
+m.appendChild(p);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");m.appendChild(k);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";m.appendChild(q);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));m.appendChild(k);var v=q.cloneNode(!0);m.appendChild(v);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(v,
+"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){l=k+1;q.value=l;v.value=l;break}q.setAttribute("max",g);v.setAttribute("max",g);1<g&&f.appendChild(m);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);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));t.appendChild(k);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="50px";t.appendChild(M);mxEvent.addListener(M,"focus",function(){u.checked=!0});f.appendChild(t);var m=m.cloneNode(!1),Q=u.cloneNode(!0);Q.setAttribute("value","fit");u.setAttribute("checked","checked");k=document.createElement("div");
+k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(Q);m.appendChild(k);t=document.createElement("table");t.style.display="inline-block";var X=document.createElement("tbody"),N=document.createElement("tr"),G=N.cloneNode(!0),W=document.createElement("td"),O=W.cloneNode(!0),ca=W.cloneNode(!0),Y=W.cloneNode(!0),S=W.cloneNode(!0),P=W.cloneNode(!0);W.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(W,mxResources.get("fitTo"));var R=document.createElement("input");
+R.style.cssText="margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("min","1");R.setAttribute("type","number");R.style.width="40px";O.appendChild(R);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross"));ca.appendChild(k);mxUtils.write(Y,mxResources.get("fitToBy"));var V=R.cloneNode(!0);S.appendChild(V);mxEvent.addListener(R,"focus",function(){Q.checked=!0});mxEvent.addListener(V,"focus",function(){Q.checked=!0});k=document.createElement("span");mxUtils.write(k,
+mxResources.get("fitToSheetsDown"));P.appendChild(k);N.appendChild(W);N.appendChild(O);N.appendChild(ca);G.appendChild(Y);G.appendChild(S);G.appendChild(P);X.appendChild(N);X.appendChild(G);t.appendChild(X);m.appendChild(t);f.appendChild(m);m=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));m.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(k,
+"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));m.appendChild(k);var Z=document.createElement("input");Z.style.cssText="margin:0 8px 0 8px;";Z.setAttribute("value","100 %");Z.style.width="60px";m.appendChild(Z);f.appendChild(m);k=document.createElement("div");k.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&&k.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),t.className="geBtn",k.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",k.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});t.className=
+"geBtn gePrimaryBtn";k.appendChild(t);a.editor.cancelFirst||k.appendChild(m);f.appendChild(k);this.container=f}})();
+(function(){EditorUi.VERSION="6.6.5";EditorUi.compactUi="atlas"!=uiTheme;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.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;(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){}})();
@@ -7589,7 +7590,7 @@ b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new D
/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var k=this.getBaseFilename(),g=k+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(g,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,k),this.saveData(g,a,l,"text/html");
else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(D){this.handleError(D)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"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 p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?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 g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(A){this.handleError(A)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
+mxUtils.getXml(a))})))}else g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!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!=a)try{this.setCurrentFile(a);
a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("readOnly"))));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),
@@ -7602,19 +7603,19 @@ b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorU
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,f=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 f=b[d],k=f.data;if(null!=k){var k=this.convertDataUri(k),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,
f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor=
-"inherit");g.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";l.appendChild(m);var z=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),
-null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var y=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=F&&null!=
-F.parentNode&&F.parentNode.removeChild(F),F=m.cloneNode(!1),F.setAttribute("src",Editor.spinImage),F.setAttribute("title",mxResources.get("saving")),F.style.cursor="default",F.style.marginRight="2px",F.style.marginTop="-2px",l.insertBefore(F,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=F&&null!=F.parentNode&&(F.parentNode.removeChild(F),g.style.paddingRight=18*l.childNodes.length+"px")})):null==z&&(z=m.cloneNode(!1),
-z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),l.insertBefore(z,l.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(g.style.paddingRight=18*l.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=
-y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=y.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);A(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(y.isSelectionEmpty())y.getRubberband().isActive()?
-(y.getRubberband().execute(a),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=y.getSelectionCells(),c=y.view.getBounds(b),d=y.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=y.view.translate.x;c.y-=y.view.translate.y;C(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.shape&&
-(y.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!1),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&(k.style.border="3px solid transparent",
-null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.graphHandler.shape&&(y.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",y.autoScroll=!0,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!0),
-null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border=
-"3px solid transparent";k.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,g,l,m,n,p,q,v){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,n),c)],c[0].vertex=!0,C(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,
-p.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var t=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));f(l,k);b=b.concat(l);A(a);this.spinner.stop();t=!0}catch(ea){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<
-m.length;g++){var l=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(l)),p=this.editor.graph.getBoundingBoxFromGeometry(n);C(n,new mxRectangle(0,0,p.width,p.height),a)}t=!0}catch(ea){null!=window.console&&console.log("error in drop handler:",ea)}}t||(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,
-p)&&null!=v?this.parseFile(v,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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();
+"inherit");g.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";l.appendChild(m);var y=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=y?this.confirm(mxResources.get("allChangesLost"),
+null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=F&&null!=
+F.parentNode&&F.parentNode.removeChild(F),F=m.cloneNode(!1),F.setAttribute("src",Editor.spinImage),F.setAttribute("title",mxResources.get("saving")),F.style.cursor="default",F.style.marginRight="2px",F.style.marginTop="-2px",l.insertBefore(F,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=F&&null!=F.parentNode&&(F.parentNode.removeChild(F),g.style.paddingRight=18*l.childNodes.length+"px")})):null==y&&(y=m.cloneNode(!1),
+y.setAttribute("src",IMAGE_PATH+"/download.png"),y.setAttribute("title",mxResources.get("save")),l.insertBefore(y,l.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==y||a.isModified()||(g.style.paddingRight=18*l.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=
+A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?
+(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;c.y-=A.view.translate.y;C(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&
+(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",
+null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),
+null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border=
+"3px solid transparent";k.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,g,l,m,n,p,q,t){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,n),c)],c[0].vertex=!0,C(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,
+p.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var v=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));f(l,k);b=b.concat(l);z(a);this.spinner.stop();v=!0}catch(da){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<
+m.length;g++){var l=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(l)),p=this.editor.graph.getBoundingBoxFromGeometry(n);C(n,new mxRectangle(0,0,p.width,p.height),a)}v=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}}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,
+p)&&null!=t?this.parseFile(t,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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();
a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var F=null;mxEvent.addListener(m,"click",E)}g.appendChild(l);g.style.paddingRight=18*l.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"==
@@ -7631,7 +7632,7 @@ EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"
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,e){if(!mxClient.IS_EDGE&&window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(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 f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,
c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(t){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?
-"&base64="+f:"")+(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),k=0;k<e;++k){for(var g=1024*k,l=Math.min(g+1024,d),x=Array(l-g),z=0;g<l;++z,++g)x[z]=c[g].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f){f=null!=f?f:!1;e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,
+"&base64="+f:"")+(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),k=0;k<e;++k){for(var g=1024*k,l=Math.min(g+1024,d),x=Array(l-g),y=0;g<l;++y,++g)x[y]=c[g].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f){f=null!=f?f:!1;e=!mxClient.IS_IOS||!navigator.standalone;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)f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=
window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,e,null,null,f?3:4);this.showDialog(b.container,380,this.getServiceCount(f)-1<(f?4:5)?270:390,!0,!0);
b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||
@@ -7644,20 +7645,20 @@ mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("sele
"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",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF?
"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);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,e,f,g,u){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=
b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.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&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),u||null==k||k.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="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,u,v,x,z){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=
+null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,u,v,x,y){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=
e);"auto"!==d&&(l.target=d);v||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);u&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),l.toolbar=c.join(" "));x&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+
-(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};
+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+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 k=document.createElement("div");k.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");k.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(l);mxUtils.br(k);k.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));k.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.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")),k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(k);var n=this.addLinkSection(e),y=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
-":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var A=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),k,!k),E=this.addCheckbox(e,mxResources.get("layers"),!0),F=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),
-!0);D.style.marginLeft="24px";D.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,y.checked,B.value,n.getTarget(),n.getColor(),A.checked,C.checked,E.checked,F.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var k=document.createElement("div");
+document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(k);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),k,!k),E=this.addCheckbox(e,mxResources.get("layers"),!0),F=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),
+!0);D.style.marginLeft="24px";D.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,A.checked,B.value,n.getTarget(),n.getColor(),z.checked,C.checked,E.checked,F.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var k=document.createElement("div");
k.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(g);var l=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var g="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(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);k.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!=c||null!=d)a+=30,mxUtils.write(k,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%",k.appendChild(p),mxUtils.write(k,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",k.appendChild(q),mxUtils.br(k);var A=this.addLinkSection(k,f);c=null!=this.pages&&1<this.pages.length;var C=null;
+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%",k.appendChild(p),mxUtils.write(k,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",k.appendChild(q),mxUtils.br(k);var z=this.addLinkSection(k,f);c=null!=this.pages&&1<this.pages.length;var C=null;
if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(k,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(k,mxResources.get("lightbox"),!0),F=this.addCheckbox(k,mxResources.get("showEditButton"),!0);F.style.marginLeft="24px";var D=this.addCheckbox(k,mxResources.get("layers"),!0);D.style.marginLeft=F.style.marginLeft;D.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?(D.removeAttribute("disabled"),F.removeAttribute("disabled")):(D.setAttribute("disabled",
-"disabled"),F.setAttribute("disabled","disabled"))});b=new CustomDialog(this,k,mxUtils.bind(this,function(){e(A.getTarget(),A.getColor(),null==C?!0:C.checked,E.checked,F.checked,D.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):A.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,
+"disabled"),F.setAttribute("disabled","disabled"))});b=new CustomDialog(this,k,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==C?!0:C.checked,E.checked,F.checked,D.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):z.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 k=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(!k.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,e,f,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.whiteSpace="nowrap";var l=this.editor.graph,m=280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";k.appendChild(n);mxUtils.write(k,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="100%";k.appendChild(p);mxUtils.write(k,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="0";k.appendChild(q);mxUtils.br(k);var t=this.addCheckbox(k,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==
@@ -7668,8 +7669,8 @@ EditorUi.prototype.showExportJpgDialog=function(a,b){var c=document.createElemen
f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value="0";c.appendChild(k);mxUtils.br(c);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);
mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var x=this.addCheckbox(c,mxResources.get("shadow"),d.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");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,
!g.checked,x.checked,k.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var k=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";
-f.appendChild(g)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var A=1<k.model.getChildCount(k.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),A,!A);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?
-(A&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,u){function k(b){var k=" ",m="";d&&(k=" 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.appendChild(g)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var z=1<k.model.getChildCount(k.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),z,!z);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?
+(z&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,u){function k(b){var k=" ",m="";d&&(k=" 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"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=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");k(a)}),null,null,null,mxUtils.bind(this,function(a){u({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):u({message:mxResources.get("unknownError")})}))}else u({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="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"+
@@ -7677,103 +7678,103 @@ EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.grap
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(k.getAttribute("width")),b=parseInt(k.getAttribute("height")),k.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",k.removeAttribute("height")),""!=q&&k.setAttribute("style",q),g(mxUtils.getXml(k))};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.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=b.background;g==mxConstants.NONE&&(g=null);b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=
c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((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,e,f,g,
-u,v){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,u):null,v)}catch(y){"Invalid image"==y.message?this.downloadFile(v):this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
-this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,u,v,x,z,y,B,A){f=null!=f?f:!0;y=null!=y?y:this.editor.graph;B=null!=B?B:0;var k=v?null:y.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==v&&(k="#ffffff");this.convertImages(y.getSvg(k,null,null,A,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),
-g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));u=null!=u?u:1;null!=b&&(u=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(u*g)+2*B;l=Math.ceil(u*l)+2*B;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(u,u);m.drawImage(d,B/u,B/u);a(e)});d.onerror=function(a){null!=e&&e(a)};try{x&&this.editor.graph.addSvgShadow(c),this.convertMath(y,c,!0,mxUtils.bind(this,function(){d.src=
-this.createSvgDataUri(mxUtils.getXml(c))}))}catch(D){null!=e&&e(D)}}),c,z)};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,
+u,v){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,u):null,v)}catch(A){"Invalid image"==A.message?this.downloadFile(v):this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(y){this.spinner.stop(),this.handleError(y)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,u,v,x,y,A,B,z){f=null!=f?f:!0;A=null!=A?A:this.editor.graph;B=null!=B?B:0;var k=v?null:A.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==v&&(k="#ffffff");this.convertImages(A.getSvg(k,null,null,z,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),
+g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));u=null!=u?u:1;null!=b&&(u=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(u*g)+2*B;l=Math.ceil(u*l)+2*B;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(u,u);m.drawImage(d,B/u,B/u);a(e)});d.onerror=function(a){null!=e&&e(a)};try{x&&this.editor.graph.addSvgShadow(c),this.convertMath(A,c,!0,mxUtils.bind(this,function(){d.src=
+this.createSvgDataUri(mxUtils.getXml(c))}))}catch(D){null!=e&&e(D)}}),c,y)};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,k){for(var g=a.getElementsByTagName(c),l=0;l<g.length;l++)mxUtils.bind(this,function(c){var g=d.convert(c.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=f[g];null==l?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(f[g]=d,c.setAttribute(k,d));e--;0==e&&b(a)})):c.setAttribute(k,l)}})(g[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};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,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),l=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var m=l.getElementsByTagName("diagram");if(1==m.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){g.model.beginUpdate();try{for(var n=0;n<m.length;n++){var p=this.updatePageRoot(new DiagramPage(m[n])),
-B=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[B+1]));g.model.execute(new ChangePage(this,p,p,B))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var A=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,A);var C=A.getChildCount(A.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<C;n++){var E=A.getChildAt(A.getRoot(),n);if(1!=C||g.isCellLocked(g.getDefaultParent()))E=g.importCells([E],0,0,g.model.getRoot(),
-null,a)[0],F=g.model.getChildren(E),g.moveCells(F,b,c),f=f.concat(F);else var F=A.getChildren(E),f=f.concat(g.importCells(F,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(K){throw e||this.handleError(K,mxResources.get("invalidOrMissingFile")),K;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
+function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var k=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),l=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var m=l.getElementsByTagName("diagram");if(1==m.length)l=mxUtils.parseXml(k.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){k.model.beginUpdate();try{for(var n=0;n<m.length;n++){var p=this.updatePageRoot(new DiagramPage(m[n])),
+B=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[B+1]));k.model.execute(new ChangePage(this,p,p,B))}}finally{k.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var z=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,z);var C=z.getChildCount(z.getRoot());k.model.getChildCount(k.model.getRoot());k.model.beginUpdate();try{a={};for(n=0;n<C;n++){var E=z.getChildAt(z.getRoot(),n);if(1!=C||k.isCellLocked(k.getDefaultParent()))E=k.importCells([E],0,0,k.model.getRoot(),
+null,a)[0],F=k.model.getChildren(E),k.moveCells(F,b,c),f=f.concat(F);else var F=z.getChildren(E),f=f.concat(k.importCells(F,b,c,k.getDefaultParent(),null,a))}if(d){k.isGridEnabled()&&(b=k.snap(b),c=k.snap(c));var D=k.getBoundingBoxFromGeometry(f,!0);null!=D&&k.moveCells(f,b-D.x,c-D.y)}}finally{k.model.endUpdate()}}}}catch(K){throw e||this.handleError(K,mxResources.get("invalidOrMissingFile")),K;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
b,c,d)}catch(q){}});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.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!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()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,
-26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(z){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),
-null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var k=null,m;for(m in e.Pages)if(l=e.Pages[m],null!=l&&"0"==l.Properties.Order){k=l;break}null!=
-k&&this.insertLucidChart(k,b,c,f)}else{g=this.editor.graph;f=null;g.getModel().beginUpdate();try{f=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=a,g.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)&&
-g.setLinkForCell(f,f.value),f.geometry.width+=g.gridSize,f.geometry.height+=g.gridSize}finally{g.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,e,f,g,u,v,x,z){x=null!=x?x:!0;var k=!1,l=null;"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,x),v=!0)),v||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,
+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()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var k=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var g=this.extractGraphModelFromPng(a),l=this.importXml(g,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(g=null,"data:image/svg+xml;base64,"==a.substring(0,
+26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(g,b,c,f,!0),0<l.length)return l}catch(y){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){k.setSelectionCell(k.insertVertex(null,null,"",k.snap(b),k.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);k.setSelectionCell(k.insertVertex(null,null,"",k.snap(b),k.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;k.getModel().beginUpdate();try{e=k.insertVertex(k.getDefaultParent(),
+null,a,k.snap(b),k.snap(c),1,1,"text;"+(d?"html=1;":"")),k.updateCellSize(e),k.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{k.getModel().endUpdate()}k.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var g=null,m;for(m in e.Pages)if(l=e.Pages[m],null!=l&&"0"==l.Properties.Order){g=l;break}null!=
+g&&this.insertLucidChart(g,b,c,f)}else{k=this.editor.graph;f=null;k.getModel().beginUpdate();try{f=k.insertVertex(k.getDefaultParent(),null,"",k.snap(b),k.snap(c),1,1,"text;"+(d?"html=1;":"")),k.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=a,k.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)&&
+k.setLinkForCell(f,f.value),f.geometry.width+=k.gridSize,f.geometry.height+=k.gridSize}finally{k.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,e,f,g,u,v,x,y){x=null!=x?x:!0;var k=!1,l=null;"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=y?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,x),v=!0)),v||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,
b)+a.substring(a.indexOf(",",b+1))),x&&l.isGridEnabled()&&(c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(k=!0,this.parseFile(null!=v?v: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!=g&&".vssx"==g.toLowerCase().substring(g.length-5)&&(g=g.substring(0,g.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,g))):b=this.importXml(a,c,d,x));null!=u&&u(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x));k||null==u||u(l);return l};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,e,f,g,u,v,x,z,y){var k=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;v=null!=v?v:!0;var l=this.editor.graph,
-m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,l,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,l,m,k,y)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],t=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=u)u(q);else{var c=[];l.getModel().beginUpdate();
-try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),H=0;H<n;H++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],u=y?null:p.getAttribute("content");null!=u&&
+(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=g&&".vssx"==g.toLowerCase().substring(g.length-5)&&(g=g.substring(0,g.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,g))):b=this.importXml(a,c,d,x));null!=u&&u(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x));k||null==u||u(l);return l};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,k;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}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,u,v,x,y,A){var k=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;v=null!=v?v:!0;var l=this.editor.graph,
+m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,l,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,l,m,k,A)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],t=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=u)u(q);else{var c=[];l.getModel().beginUpdate();
+try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),H=0;H<n;H++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],u=A?null:p.getAttribute("content");null!=u&&
"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?t(f,mxUtils.bind(this,function(){try{if(l.substring(0,n+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var g=a[0],p=parseFloat(g.getAttribute("width")),v=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox",
-"0 0 "+p+" "+v);else if(isNaN(p)||isNaN(v)){var u=t.split(" ");3<u.length&&(p=parseFloat(u[2]),v=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,v));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*x)),Math.max(1,Math.round(v*x)),k.name)}}}catch(T){}return null})):t(f,mxUtils.bind(this,function(){return e(u,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var A=y?null:this.extractGraphModelFromPng(a.target.result);
-if(null!=A&&0<A.length){var B=new Image;B.src=a.target.result;t(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*m,c+f*m,B.width,B.height,k.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(g){this.resizeImage(g,
-a.target.result,mxUtils.bind(this,function(g,l,n){t(f,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var p=v&&this.isResampleImage(a.target.result)?Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,d,z)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){t(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)?
+"0 0 "+p+" "+v);else if(isNaN(p)||isNaN(v)){var u=t.split(" ");3<u.length&&(p=parseFloat(u[2]),v=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,v));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*x)),Math.max(1,Math.round(v*x)),k.name)}}}catch(T){}return null})):t(f,mxUtils.bind(this,function(){return e(u,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var z=A?null:this.extractGraphModelFromPng(a.target.result);
+if(null!=z&&0<z.length){var B=new Image;B.src=a.target.result;t(f,mxUtils.bind(this,function(){return e(z,"text/xml",b+f*m,c+f*m,B.width,B.height,k.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(g){this.resizeImage(g,
+a.target.result,mxUtils.bind(this,function(g,l,n){t(f,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var p=v&&this.isResampleImage(a.target.result)?Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,d,y)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){t(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)?
e(null,k.type,b+f*m,c+f*m,240,160,k.name,function(a){t(f,function(){return a})},k):"image"==k.type.substring(0,5)?l.readAsDataURL(k):l.readAsText(k)})(H)};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,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),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 A=document.createElement("canvas");A.width=m;A.height=n;var C=A.toDataURL();q!==C&&(b=q,g=m,k=n)}}}catch(E){}c(b,g,k)};EditorUi.prototype.crcTable=[];
+function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var k=Math.max(1,a.width),g=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(k/e,g/e);if(1<l){var m=Math.round(k/l),n=Math.round(g/l),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 z=document.createElement("canvas");z.width=m;z.height=n;var C=z.toDataURL();q!==C&&(b=q,k=m,g=n)}}}catch(E){}c(b,k,g)};EditorUi.prototype.crcTable=[];
for(var c=0;256>c;c++)for(var f=c,d=0;8>d;d++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[c]=f;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,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(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(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var m=g(a);if("IDAT"==f(a,4)){e=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);e+=k(c.length)+b+c+k(d^4294967295);
e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+m);d=f(a,m);f(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);
-var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.graph.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:d.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=
-b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.isEnabled();if(!this.editor.chromeless){var f=function(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.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||a.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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(K){}}),!1);var g=document.createElement("div");g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.contentEditable=!0;mxUtils.setOpacity(g,
-0);g.style.width="1px";g.style.height="1px";g.innerHTML="&nbsp;";var t=!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 c=mxEvent.getSource(b);null==a.container||!a.isEnabled()||a.isMouseDown||a.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||
-t||(g.style.left=a.container.scrollLeft+10+"px",g.style.top=a.container.scrollTop+10+"px",a.container.appendChild(g),t=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){g.focus();document.execCommand("selectAll",!1,null)},0):(g.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=c&&17!=c&&91!=c||(t=!1,a.isEditing()||null!=this.dialog||null==a.container||a.container.focus(),
-g.parentNode.removeChild(g))}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(g),f())}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(g,!0),f())}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,g);g.innerHTML="&nbsp;"}),0))}),
-!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==g?!0:u.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.test){e=document.getElementById("geFooter");null!=e&&(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)})),e.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 v=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:v.apply(this,arguments)}}e=document.getElementById("geInfo");null!=e&&e.parentNode.removeChild(e);if(Graph.fileSupport){var x=
-null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=x&&(x.parentNode.removeChild(x),x=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){null==x&&(!mxClient.IS_IE||10<document.documentMode)&&(x=this.highlightElement(a.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=x&&(x.parentNode.removeChild(x),
-x=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.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 k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=
-k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=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,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,
-f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};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.insertLucidChart(JSON.parse(d)),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(v){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(v){}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(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){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(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);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){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=
-0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?
-this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,
-d)});b.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)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};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()?(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"))}))):e())};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)};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.showLayersDialog()):(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(J){}return a}var l=f.data;if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(H){l=null}if(null==l)return;
-if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var m=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?
-mxResources.get(l.titleKey):l.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==l.action){m=null;m="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):k(l.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(H){g.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=
-l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,
-t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data=a;g.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=
-this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),F=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:F.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(D.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,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
-("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=
-this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),
-"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),
-this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
-"12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}l=k(l);c=!0;try{a(l,f)}catch(H){this.handleError(H)}c=!1;null!=
-urlParams.modified&&this.editor.setStatus("");var K=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=K();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=K();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),
-"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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")+" (Ctrl+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,f=null,g="auto",k="auto",v=40,x=40,z=0,y=this.editor.graph;y.getGraphBounds();for(var B=function(){y.setSelectionCells(S);y.scrollCellToVisible(y.getSelectionCell())},A=y.getFreeInsertPoint(),C=A.x,E=A.y,A=E,F=null,D="auto",K=[],H=null,J=null,I=0;I<b.length&&"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var L=a.indexOf(":");
-if(0<L){var M=mxUtils.trim(a.substring(1,L)),Q=mxUtils.trim(a.substring(L+1));"label"==M?F=y.sanitizeHtml(Q):"style"==M?e=Q:"identity"==M&&0<Q.length&&"-"!=Q?f=Q:"width"==M?g=Q:"height"==M?k=Q:"ignore"==M?J=Q.split(","):"connect"==M?K.push(JSON.parse(Q)):"link"==M?H=Q:"padding"==M?z=parseFloat(Q):"edgespacing"==M?v=parseFloat(Q):"nodespacing"==M?x=parseFloat(Q):"layout"==M&&(D=Q)}}}var W=this.editor.csvToArray(b[I]);a=null;if(null!=f)for(var O=0;O<W.length;O++)if(f==W[O]){a=O;break}null==F&&(F="%"+
-W[0]+"%");if(null!=K)for(var G=0;G<K.length;G++)null==d[K[G].to]&&(d[K[G].to]={});y.model.beginUpdate();try{for(O=I+1;O<b.length;O++){var X=this.editor.csvToArray(b[O]);if(X.length==W.length){var N=null,da=null!=a?X[a]:null;null!=da&&(N=y.model.getCell(da));null==N&&(N=new mxCell(F,new mxGeometry(C,A,0,0),e||"whiteSpace=wrap;html=1;"),N.vertex=!0,N.id=da);for(var Y=0;Y<X.length;Y++)y.setAttributeForCell(N,W[Y],X[Y]);y.setAttributeForCell(N,"placeholders","1");N.style=y.replacePlaceholders(N,N.style);
-for(G=0;G<K.length;G++)d[K[G].to][N.getAttribute(K[G].to)]=N;null!=H&&"link"!=H&&(y.setLinkForCell(N,N.getAttribute(H)),y.setAttributeForCell(N,H,null));var R=this.editor.graph.getPreferredSizeForCell(N);N.geometry.width="auto"==g?R.width+z:parseFloat(g);N.geometry.height="auto"==k?R.height+z:parseFloat(k);A+=N.geometry.height+x;c.push(y.addCell(N))}}null==e&&y.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var P=c.slice(),S=c.slice(),G=0;G<K.length;G++)for(var V=K[G],O=0;O<c.length;O++){var N=
-c[O],ea=N.getAttribute(V.from);if(null!=ea){y.setAttributeForCell(N,V.from,null);for(var ba=ea.split(","),Y=0;Y<ba.length;Y++){var T=d[V.to][ba[Y]];null!=T&&(S.push(y.insertEdge(null,null,V.label||"",V.invert?T:N,V.invert?N:T,V.style||y.createCurrentEdgeStyle())),mxUtils.remove(V.invert?N:T,P))}}}if(null!=J)for(O=0;O<c.length;O++)for(N=c[O],Y=0;Y<J.length;Y++)y.setAttributeForCell(N,mxUtils.trim(J[Y]),null);var aa=new mxParallelEdgeLayout(y);aa.spacing=v;var ca=function(){aa.execute(y.getDefaultParent());
-for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==g&&(b.width=Math.round(y.snap(b.width)));"auto"==k&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==D){var U=new mxCircleLayout(y);U.resetEdges=!1;var Z=U.isVertexIgnored;U.isVertexIgnored=function(a){return Z.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){U.execute(y.getDefaultParent());ca()},!0,B);B=null}else if("horizontaltree"==D||"verticaltree"==
-D||"auto"==D&&S.length==2*c.length-1&&1==P.length){y.view.validate();var ha=new mxCompactTreeLayout(y,"horizontaltree"==D);ha.levelDistance=x;ha.edgeRouting=!1;this.executeLayout(function(){ha.execute(y.getDefaultParent(),0<P.length?P[0]:null)},!0,B);B=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==P.length){y.view.validate();var fa=new mxHierarchicalLayout(y,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fa.intraCellSpacing=x;this.executeLayout(function(){fa.execute(y.getDefaultParent(),
-S);y.moveCells(S,C,E)},!0,B);B=null}else if("organic"==D||"auto"==D&&S.length>c.length){y.view.validate();var ka=new mxFastOrganicLayout(y);ka.forceConstant=3*x;ka.resetEdges=!1;var ja=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(y);aa.spacing=v;this.executeLayout(function(){ka.execute(y.getDefaultParent());ca()},!0,B);B=null}this.hideDialog()}finally{y.model.endUpdate()}null!=B&&B()}}catch(la){this.handleError(la)}};
-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(" "),
+var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.graph.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,
+c.currentPage)+1:1:d.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.isEnabled();if(!this.editor.chromeless){var f=function(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.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||a.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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(K){}}),!1);var g=document.createElement("div");
+g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.contentEditable=!0;mxUtils.setOpacity(g,0);g.style.width="1px";g.style.height="1px";g.innerHTML="&nbsp;";var t=!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 c=mxEvent.getSource(b);null==a.container||!a.isEnabled()||a.isMouseDown||a.isEditing()||
+null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||t||(g.style.left=a.container.scrollLeft+10+"px",g.style.top=a.container.scrollTop+10+"px",a.container.appendChild(g),t=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){g.focus();document.execCommand("selectAll",!1,null)},0):(g.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=
+b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=c&&17!=c&&91!=c||(t=!1,a.isEditing()||null!=this.dialog||null==a.container||a.container.focus(),g.parentNode.removeChild(g))}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(g),f())}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(g,!0),f())}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&
+(g.innerHTML="&nbsp;",g.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,g);g.innerHTML="&nbsp;"}),0))}),!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==g?!0:u.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.test){e=document.getElementById("geFooter");
+null!=e&&(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)})),e.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 v=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:v.apply(this,arguments)}}e=document.getElementById("geInfo");
+null!=e&&e.parentNode.removeChild(e);if(Graph.fileSupport){var x=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=x&&(x.parentNode.removeChild(x),x=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){null==x&&(!mxClient.IS_IE||10<document.documentMode)&&(x=this.highlightElement(a.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=x&&(x.parentNode.removeChild(x),x=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.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 k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=
+e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=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,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};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.insertLucidChart(JSON.parse(d)),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(v){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(v){}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(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){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(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);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){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+
+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else"image/png"==
+a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,d)});b.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)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};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()?(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"))}))):e())};
+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)};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.showLayersDialog()):
+(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(J){}return a}var l=f.data;
+if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(H){l=null}if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var m=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=
+a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==l.action){m=null;m="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):k(l.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(H){g.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();
+m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):
+null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?
+l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data=a;g.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);
+t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),F=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:F.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(D.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,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=
+this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,
+null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),
+"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),
+mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),
+"*");return}}l=k(l);c=!0;try{a(l,f)}catch(H){this.handleError(H)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var K=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=K();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=K();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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")+" (Ctrl+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,f=null,g="auto",k="auto",v=40,x=40,y=0,A=this.editor.graph;A.getGraphBounds();for(var B=function(){A.setSelectionCells(R);A.scrollCellToVisible(A.getSelectionCell())},z=A.getFreeInsertPoint(),C=z.x,E=z.y,z=E,F=null,D="auto",K=[],H=null,J=null,I=0;I<b.length&&"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var L=a.indexOf(":");if(0<L){var M=mxUtils.trim(a.substring(1,L)),Q=mxUtils.trim(a.substring(L+1));"label"==M?F=A.sanitizeHtml(Q):"style"==M?e=Q:"identity"==M&&0<Q.length&&"-"!=Q?f=Q:"width"==M?g=Q:"height"==M?k=Q:"ignore"==M?J=Q.split(","):"connect"==M?K.push(JSON.parse(Q)):"link"==M?H=Q:"padding"==M?y=parseFloat(Q):"edgespacing"==M?v=parseFloat(Q):"nodespacing"==M?x=parseFloat(Q):"layout"==M&&(D=Q)}}}var X=this.editor.csvToArray(b[I]);
+a=null;if(null!=f)for(var N=0;N<X.length;N++)if(f==X[N]){a=N;break}null==F&&(F="%"+X[0]+"%");if(null!=K)for(var G=0;G<K.length;G++)null==d[K[G].to]&&(d[K[G].to]={});A.model.beginUpdate();try{for(N=I+1;N<b.length;N++){var W=this.editor.csvToArray(b[N]);if(W.length==X.length){var O=null,ca=null!=a?W[a]:null;null!=ca&&(O=A.model.getCell(ca));null==O&&(O=new mxCell(F,new mxGeometry(C,z,0,0),e||"whiteSpace=wrap;html=1;"),O.vertex=!0,O.id=ca);for(var Y=0;Y<W.length;Y++)A.setAttributeForCell(O,X[Y],W[Y]);
+A.setAttributeForCell(O,"placeholders","1");O.style=A.replacePlaceholders(O,O.style);for(G=0;G<K.length;G++)d[K[G].to][O.getAttribute(K[G].to)]=O;null!=H&&"link"!=H&&(A.setLinkForCell(O,O.getAttribute(H)),A.setAttributeForCell(O,H,null));var S=this.editor.graph.getPreferredSizeForCell(O);O.geometry.width="auto"==g?S.width+y:parseFloat(g);O.geometry.height="auto"==k?S.height+y:parseFloat(k);z+=O.geometry.height+x;c.push(A.addCell(O))}}null==e&&A.fireEvent(new mxEventObject("cellsInserted","cells",
+c));for(var P=c.slice(),R=c.slice(),G=0;G<K.length;G++)for(var V=K[G],N=0;N<c.length;N++){var O=c[N],da=O.getAttribute(V.from);if(null!=da){A.setAttributeForCell(O,V.from,null);for(var Z=da.split(","),Y=0;Y<Z.length;Y++){var T=d[V.to][Z[Y]];null!=T&&(R.push(A.insertEdge(null,null,V.label||"",V.invert?T:O,V.invert?O:T,V.style||A.createCurrentEdgeStyle())),mxUtils.remove(V.invert?O:T,P))}}}if(null!=J)for(N=0;N<c.length;N++)for(O=c[N],Y=0;Y<J.length;Y++)A.setAttributeForCell(O,mxUtils.trim(J[Y]),null);
+var ba=new mxParallelEdgeLayout(A);ba.spacing=v;var ea=function(){ba.execute(A.getDefaultParent());for(var a=0;a<c.length;a++){var b=A.getCellGeometry(c[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==g&&(b.width=Math.round(A.snap(b.width)));"auto"==k&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==D){var U=new mxCircleLayout(A);U.resetEdges=!1;var aa=U.isVertexIgnored;U.isVertexIgnored=function(a){return aa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){U.execute(A.getDefaultParent());
+ea()},!0,B);B=null}else if("horizontaltree"==D||"verticaltree"==D||"auto"==D&&R.length==2*c.length-1&&1==P.length){A.view.validate();var ha=new mxCompactTreeLayout(A,"horizontaltree"==D);ha.levelDistance=x;ha.edgeRouting=!1;this.executeLayout(function(){ha.execute(A.getDefaultParent(),0<P.length?P[0]:null)},!0,B);B=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==P.length){A.view.validate();var fa=new mxHierarchicalLayout(A,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
+fa.intraCellSpacing=x;this.executeLayout(function(){fa.execute(A.getDefaultParent(),R);A.moveCells(R,C,E)},!0,B);B=null}else if("organic"==D||"auto"==D&&R.length>c.length){A.view.validate();var ka=new mxFastOrganicLayout(A);ka.forceConstant=3*x;ka.resetEdges=!1;var ja=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ba=new mxParallelEdgeLayout(A);ba.spacing=v;this.executeLayout(function(){ka.execute(A.getDefaultParent());ea()},!0,B);B=null}this.hideDialog()}finally{A.model.endUpdate()}null!=
+B&&B()}}catch(la){this.handleError(la)}};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};var e=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=e.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*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return f.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*
@@ -7782,14 +7783,14 @@ null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.back
("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 c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.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);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 d=applicationCache;if(null!=d&&null==this.offlineStatus){var e=function(a){switch(a){case d.UNCACHED:return"";case d.IDLE:return'<img title="Cached" border="0" src="'+
-IMAGE_PATH+'/checkmark.gif"/>';case d.CHECKING:return'<img title="Checking..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.DOWNLOADING:return'<img title="Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.UPDATEREADY:return'<img title="Update ready" border="0" src="'+IMAGE_PATH+'/download.png"/>';case d.OBSOLETE:return'<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';default:return'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}};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);d=window.applicationCache;
-b=mxUtils.bind(this,function(){this.offlineStatus.innerHTML=e(d.status)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").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&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);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.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==
-c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*e/g.view.scale),n=Math.floor(l.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();
+IMAGE_PATH+'/checkmark.gif"/>';case d.CHECKING:return'<img title="Checking/Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.DOWNLOADING:return'<img title="Checking/Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.UPDATEREADY:return'<img title="Update ready" border="0" src="'+IMAGE_PATH+'/download.png"/>';case d.OBSOLETE:return'<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';default:return'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}};
+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"))}));d=window.applicationCache;b=mxUtils.bind(this,function(){var a=e(d.status);this.offlineStatus.innerHTML!=a&&(this.offlineStatus.innerHTML=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",
+b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=
+b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").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&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);
+this.actions.get("createRevision").setEnabled(c);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.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*e/g.view.scale),
+n=Math.floor(l.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();
var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],recentColors:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:Graph.prototype.defaultVertexStyle,createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:13,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=
a},getUi:function(){return this.settings.ui},setUi:function(a){this.settings.ui=a},getShowStartScreen:function(){return this.settings.showStartScreen},setShowStartScreen:function(a){this.settings.showStartScreen=a},getGridColor:function(){return this.settings.gridColor},setGridColor:function(a){this.settings.gridColor=a},getAutosave:function(){return this.settings.autosave},setAutosave:function(a){this.settings.autosave=a},getLibraries:function(){return this.settings.libraries},setLibraries:function(a){this.settings.libraries=
a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(this.settings.customLibraries,a)&&this.settings.customLibraries.push(a);mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,this.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return this.settings.customLibraries},getPlugins:function(){return this.settings.plugins},setPlugins:function(a){this.settings.plugins=a},getRecentColors:function(){return this.settings.recentColors},
@@ -7972,21 +7973,21 @@ null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.use
(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.addLinkToItem=function(a,b){if(null!=a){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;";
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(a){this.editorUi.menubar.hideMenu();window.open(b);mxEvent.consume(a)}));a.firstChild.nextSibling.appendChild(c)}};var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,b=a.editor.graph,e=mxUtils.bind(b,b.isEnabled),f=("1"!=urlParams.embed&&
"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),k=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),l=("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);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.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};a.actions.addAction("exportPdf",function(){a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!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(){b.getSelectionCells();if(1==b.getSelectionCount()){var c=b.getSelectionCell(),d=b.view.getState(c);null!=
-d&&null!=d.shape&&null!=d.shape.stencil&&(c=new EditShapeDialog(a,c,mxResources.get("editShape")+":",630,400),a.showDialog(c.container,640,480,!0,!1),c.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,
-mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);
-var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(C){a.handleError(C)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),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,"Ctrl+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 m=a.actions.addAction("mathematicalTypesetting",function(){a.setMathEnabled(!a.isMathEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return a.isMathEnabled()});m.isEnabled=e}isLocalStorage&&
-(m=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),m.setToggleAction(!0),m.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 c=b.getSelectionCells(),
-d=[],e=0;e<c.length;e++)b.getModel().isVertex(c[e])&&d.push(c[e]);0<d.length&&(c=new EditGeometryDialog(a,d),a.showDialog(c.container,180,180,!0,!0),c.init())},null,null,"Ctrl+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 c=b.view.getState(b.getSelectionCell());if(b.isEnabled()&&null!=c){a.copiedStyle=mxUtils.clone(c.style);for(var c=b.getModel().getStyle(c.cell),c=null!=c?c.split(";"):[],d=0;d<c.length;d++){var e=c[d],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,"Ctrl+Shift+C");a.actions.addAction("pasteStyle",function(){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=a.copiedStyle){b.getModel().beginUpdate();
-try{for(var c=b.getSelectionCells(),d=0;d<c.length;d++)for(var e=b.view.getState(c[d]),f=0;f<p.length;f++){var g=p[f],k=a.copiedStyle[g];e.style[g]!=k&&b.setCellStyles(g,k,[c[d]])}}finally{b.getModel().endUpdate()}}},null,null,"Ctrl+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()}}));m=a.actions.put("shadowVisible",
-new Action(mxResources.get("shadow"),function(){b.setShadowVisible(!b.shadowVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return b.shadowVisible});a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){a.showDialog((new AboutDialog(a)).container,220,300,!0,!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://support.draw.io/display/DO/draw.io+Online+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=8OaMWa4R1SE&t=1")});m=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())}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));m=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"))}),
+"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=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.addAction("exportPdf",function(){a.showDialog((new PrintDialog(a,
+mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!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(){b.getSelectionCells();if(1==b.getSelectionCount()){var c=b.getSelectionCell(),d=b.view.getState(c);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(c=new EditShapeDialog(a,c,mxResources.get("editShape")+":",630,400),a.showDialog(c.container,
+640,480,!0,!1),c.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,
+limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(C){a.handleError(C)}}));
+c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),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,"Ctrl+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 m=a.actions.addAction("mathematicalTypesetting",function(){a.setMathEnabled(!a.isMathEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return a.isMathEnabled()});m.isEnabled=e}isLocalStorage&&(m=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),
+m.setToggleAction(!0),m.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 c=b.getSelectionCells(),d=[],e=0;e<c.length;e++)b.getModel().isVertex(c[e])&&d.push(c[e]);0<d.length&&(c=new EditGeometryDialog(a,d),a.showDialog(c.container,180,
+180,!0,!0),c.init())},null,null,"Ctrl+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 c=b.view.getState(b.getSelectionCell());
+if(b.isEnabled()&&null!=c){a.copiedStyle=mxUtils.clone(c.style);for(var c=b.getModel().getStyle(c.cell),c=null!=c?c.split(";"):[],d=0;d<c.length;d++){var e=c[d],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,"Ctrl+Shift+C");a.actions.addAction("pasteStyle",function(){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=a.copiedStyle){b.getModel().beginUpdate();try{for(var c=b.getSelectionCells(),d=0;d<c.length;d++)for(var e=
+b.view.getState(c[d]),f=0;f<p.length;f++){var g=p[f],k=a.copiedStyle[g];e.style[g]!=k&&b.setCellStyles(g,k,[c[d]])}}finally{b.getModel().endUpdate()}}},null,null,"Ctrl+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()}}));m=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){b.setShadowVisible(!b.shadowVisible)}));
+m.setToggleAction(!0);m.setSelectedCallback(function(){return b.shadowVisible});a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){a.showDialog((new AboutDialog(a)).container,220,300,!0,!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://support.draw.io/display/DO/draw.io+Online+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=8OaMWa4R1SE&t=1")});m=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())}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));m=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())}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));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 q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.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||
@@ -8034,31 +8035,30 @@ return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEna
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("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));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)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);
-this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var t="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),u=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)};a.actions.addAction("insertText",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");
-a.vertex=!0;b.startEditingAtCell(b.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=e;a.actions.addAction("insertRectangle",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;b.setSelectionCell(b.addCell(a));b.scrollCellToVisible(b.getSelectionCell())}},null,null,"Ctrl+K").isEnabled=e;a.actions.addAction("insertEllipse",function(){if(b.isEnabled()&&
-!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;b.setSelectionCell(b.addCell(a));b.scrollCellToVisible(b.getSelectionCell())}},null,null,"Ctrl+Shift+K").isEnabled=e;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):u(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(b,
-c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):f&&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):k&&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):l&&b.addItem(mxResources.get("oneDrive")+" ("+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)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},
-c);a.isOffline()||(b.addSeparator(c),b.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)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",
-new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):f&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):f&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&
-a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(C){a.handleError(C,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},
-mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers",
-"-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
-c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addSubmenu("insert",b,c);b.addSeparator(c);this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);
-"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed?(b.addSeparator(c),this.addMenuItem(b,"tags",c),b.addSeparator(c)):(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966"),this.addMenuItems(b,["-","offline"],c));a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["chromeApp"],
-c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();
-null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,
-["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&
-d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var f=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");
-c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}f.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;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,c,f){this.ui=a;this.page=c;this.previous=f}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,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
+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(" "),u=
+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)};a.actions.addAction("insertText",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),
+"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");a.vertex=!0;b.startEditingAtCell(b.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=e;a.actions.addAction("insertRectangle",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;b.setSelectionCell(b.addCell(a));b.scrollCellToVisible(b.getSelectionCell())}},
+null,null,"Ctrl+K").isEnabled=e;a.actions.addAction("insertEllipse",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;b.setSelectionCell(b.addCell(a));b.scrollCellToVisible(b.getSelectionCell())}},null,null,"Ctrl+Shift+K").isEnabled=e;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):u(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(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):f&&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):k&&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):l&&b.addItem(mxResources.get("oneDrive")+" ("+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)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,
+function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.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)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);
+b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):f&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
+c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);
+isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},
+c):f&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",
+null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,
+function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(C){a.handleError(C,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},
+function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,
+(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,
+"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(b,
+["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed?(b.addSeparator(c),this.addMenuItem(b,"tags",c),b.addSeparator(c)):(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966"),this.addMenuItems(b,["-","offline"],c));a.isOffline()||
+navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],
+c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,
+["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",
+b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var f=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight=
+"0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}f.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;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,c,f){this.ui=a;this.page=c;this.previous=f}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,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
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,c){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,c=this.ui.editor,f=c.graph,d=c.graph.compress(f.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=f.getViewState();a.root=f.model.root;f.view.clear(a.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;f.model.rootChanged(a.root);f.setViewState(a.viewState);
c.fireEvent(new mxEventObject("setViewState","change",this));f.gridEnabled=f.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);c.updateGraphComponents();f.view.validate();f.sizeDidChange();this.neverShown&&(this.neverShown=!1,f.selectUnlockedLayer());c.graph.fireEvent(new mxEventObject(mxEvent.ROOT));c.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,c,f,d){SelectPage.call(this,a,f);this.relatedPage=c;this.index=d;this.previousIndex=null}
@@ -8260,8 +8260,8 @@ Image_iphone_email_name:"shape=rect;rounded=1;",Image_iphone_switch_off:"shape=m
Image_iphone_remove_icon:"shape=mxgraph.ios.iDeleteIcon;fillColor=#e8878E;fillColor2=#BD1421;strokeColor=#ffffff;",Image_iphone_arrow_icon:"shape=mxgraph.ios.iArrowIcon;fillColor=#8BbEff;fillColor2=#135Ec8;strokeColor=#ffffff;",Image_iphone_arrow:"shape=mxgraph.ios7.misc.more;",Image_iphone_checkmark:"shape=mxgraph.ios7.misc.check;",Image_iphone_check_off:"shape=ellipse;",Image_iphone_location_dot:"shape=ellipse;",Image_iphone_mark_as_read:"shape=ellipse;",Image_iphone_pin_green:"shape=mxgraph.ios.iPin;fillColor2=#00dd00;fillColor3=#004400;strokeColor=#006600;",
Image_iphone_pin_red:"shape=mxgraph.ios.iPin;fillColor2=#dd0000;fillColor3=#440000;strokeColor=#660000;",Image_iphone_radio_off:"shape=ellipse;",Image_iphone_checkbox_off:"shape=rect;rounded=1;",Image_iphone_indicator:"shape=rect;rounded=1;fillColor=#e8878E;gradientColor=#BD1421;strokeColor=#ffffff;",Image_iphone_thread_count:"shape=rect;rounded=1;"};EditorUi.prototype.pasteLucidChart=function(b,e,g,n){var k=this.editor.graph;k.getModel().beginUpdate();try{var l=function(b,d){var l=null!=d.Endpoint1.Block?
u[d.Endpoint1.Block]:null,n=null!=d.Endpoint2.Block?u[d.Endpoint2.Block]:null,p=new mxCell("",new mxGeometry(0,0,100,100),"html=1;");p.geometry.relative=!0;p.edge=!0;f(p,b);var q=c(b).Properties,q=null!=q?q.TextAreas:b.TextAreas;if(null!=q)for(var t=0;null!=q["t"+t];){var q=q["t"+t],v=2*(parseFloat(q.Location)-.5),v=new mxCell(a(q),new mxGeometry(v,0,0,0),"text;html=1;resizable=0;align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;");v.geometry.relative=!0;v.vertex=!0;p.insert(v);t++}null==
-l&&null!=d.Endpoint1&&p.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x+e),Math.round(.6*d.Endpoint1.y+g)),!0);null==n&&null!=d.Endpoint2&&p.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x+e),Math.round(.6*d.Endpoint2.y+g)),!1);m.push(k.addCell(p,null,null,l,n))},m=[],u={},v=[];if(null!=b.Blocks)for(var x in b.Blocks){var z=b.Blocks[x];z.id=x;u[z.id]=d(z);v.push(z)}else for(var y=0;y<b.Objects.length;y++)z=b.Objects[y],z.IsBlock&&null!=z.Action&&null!=z.Action.Properties&&
-(u[z.id]=d(z)),v.push(z);v.sort(function(a,b){a=c(a);b=c(b);return null!=a.Properties&&null!=b.Properties?a.Properties.ZOrder-b.Properties.ZOrder:0});for(y=0;y<v.length;y++){var z=v[y],B=u[z.id];null!=B?m.push(k.addCell(B)):z.IsLine&&null!=z.Action&&null!=z.Action.Properties&&l(z,z.Action.Properties)}if(null!=b.Lines)for(x in b.Lines)z=b.Lines[x],l(z,z);if(n&&null!=e&&null!=g){k.isGridEnabled()&&(e=k.snap(e),g=k.snap(g));var A=k.getBoundingBoxFromGeometry(m,!0);null!=A&&k.moveCells(m,e-A.x,g-A.y)}k.setSelectionCells(m)}finally{k.getModel().endUpdate()}k.isSelectionEmpty()||
+l&&null!=d.Endpoint1&&p.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x+e),Math.round(.6*d.Endpoint1.y+g)),!0);null==n&&null!=d.Endpoint2&&p.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x+e),Math.round(.6*d.Endpoint2.y+g)),!1);m.push(k.addCell(p,null,null,l,n))},m=[],u={},v=[];if(null!=b.Blocks)for(var x in b.Blocks){var y=b.Blocks[x];y.id=x;u[y.id]=d(y);v.push(y)}else for(var A=0;A<b.Objects.length;A++)y=b.Objects[A],y.IsBlock&&null!=y.Action&&null!=y.Action.Properties&&
+(u[y.id]=d(y)),v.push(y);v.sort(function(a,b){a=c(a);b=c(b);return null!=a.Properties&&null!=b.Properties?a.Properties.ZOrder-b.Properties.ZOrder:0});for(A=0;A<v.length;A++){var y=v[A],B=u[y.id];null!=B?m.push(k.addCell(B)):y.IsLine&&null!=y.Action&&null!=y.Action.Properties&&l(y,y.Action.Properties)}if(null!=b.Lines)for(x in b.Lines)y=b.Lines[x],l(y,y);if(n&&null!=e&&null!=g){k.isGridEnabled()&&(e=k.snap(e),g=k.snap(g));var z=k.getBoundingBoxFromGeometry(m,!0);null!=z&&k.moveCells(m,e-z.x,g-z.y)}k.setSelectionCells(m)}finally{k.getModel().endUpdate()}k.isSelectionEmpty()||
(k.scrollCellToVisible(k.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(k.view.getState(k.getSelectionCell())))}})();function DrawioViewer(a,c,f,d,b,e,g){this.id=c;this.diagramName=a;this.ceoId=f;this.options=d;this.lightbox=b;this.graphDocument=e;this.paddingBottom=(this.connect=g)?0:30;a=null;g||null==d.language?null!=g&&null!=urlParams.loc&&(a=urlParams.loc,d=a.indexOf("-"),0<=d&&(a=a.substring(0,d))):a=d.language;"de"==a&&(mxClient.language="de");d=mxResources.extension;g=mxResources.isLanguageSupported;mxResources.extension=".txt";mxResources.isLanguageSupported=function(a){return"de"==a};mxResources.add(this.options.resourcePath);
mxResources.extension=d;mxResources.isLanguageSupported=g;this.buttons=this.createButtons();this.transparentImage=Editor.prototype.transparentImage;this.extractGraphModel=Editor.prototype.extractGraphModel;this.setGraphXml=Editor.prototype.setGraphXml;this.readGraphState=Editor.prototype.readGraphState;this.resetGraph=Editor.prototype.resetGraph;this.decompress=Editor.prototype.decompress;this.updateGraphComponents=Editor.prototype.updateGraphComponents;this.fireEvent=Editor.prototype.fireEvent;this.addListener=
Editor.prototype.addListener;this.originalNoForeignObject=Editor.prototype.originalNoForeignObject;this.gridImage="";this.addListener("resetGraphView",this.resetGraphView)}DrawioViewer.prototype=new mxEventSource;DrawioViewer.prototype.graph;DrawioViewer.prototype.id;DrawioViewer.prototype.toolbar;DrawioViewer.prototype.options;DrawioViewer.prototype.originX=0;DrawioViewer.prototype.originY=0;DrawioViewer.prototype.popupWindow;DrawioViewer.prototype.buttons={};
diff --git a/war/js/diagramly/Dialogs.js b/war/js/diagramly/Dialogs.js
index 9a4395f1..78ab2135 100644
--- a/war/js/diagramly/Dialogs.js
+++ b/war/js/diagramly/Dialogs.js
@@ -3675,558 +3675,6 @@ var ImageDialog = function(editorUi, title, initialValue, fn, ignoreExisting, co
};
/**
- * Constructs a new print dialog.
- */
-PrintDialog.prototype.create = function(editorUi, titleText)
-{
- var graph = editorUi.editor.graph;
- var div = document.createElement('div');
-
- var title = document.createElement('h3');
- title.style.width = '100%';
- title.style.textAlign = 'center';
- title.style.marginTop = '0px';
- mxUtils.write(title, titleText || mxResources.get('print'));
- div.appendChild(title);
-
- var pageCount = 1;
- var currentPage = 1;
-
- // Pages
- var pagesSection = document.createElement('div');
- pagesSection.style.cssText = 'border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;';
-
- var allPagesRadio = document.createElement('input');
- allPagesRadio.style.cssText = 'margin-right:8px;margin-bottom:8px;';
- allPagesRadio.setAttribute('value', 'all');
- allPagesRadio.setAttribute('type', 'radio');
- allPagesRadio.setAttribute('name', 'pages-printdialog');
-
- pagesSection.appendChild(allPagesRadio);
-
- var span = document.createElement('span');
- mxUtils.write(span, mxResources.get('printAllPages'));
- pagesSection.appendChild(span);
-
- mxUtils.br(pagesSection);
-
- // Pages ... to ...
- var pagesRadio = allPagesRadio.cloneNode(true);
- allPagesRadio.setAttribute('checked', 'checked');
- pagesRadio.setAttribute('value', 'range');
- pagesSection.appendChild(pagesRadio);
-
- var span = document.createElement('span');
- mxUtils.write(span, mxResources.get('pages') + ':');
- pagesSection.appendChild(span);
-
- var pagesFromInput = document.createElement('input');
- pagesFromInput.style.cssText = 'margin:0 8px 0 8px;'
- pagesFromInput.setAttribute('value', '1');
- pagesFromInput.setAttribute('type', 'number');
- pagesFromInput.setAttribute('min', '1');
- pagesFromInput.style.width = '50px';
- pagesSection.appendChild(pagesFromInput);
-
- var span = document.createElement('span');
- mxUtils.write(span, mxResources.get('to'));
- pagesSection.appendChild(span);
-
- var pagesToInput = pagesFromInput.cloneNode(true);
- pagesSection.appendChild(pagesToInput);
-
- mxEvent.addListener(pagesFromInput, 'focus', function()
- {
- pagesRadio.checked = true;
- });
-
- mxEvent.addListener(pagesToInput, 'focus', function()
- {
- pagesRadio.checked = true;
- });
-
- function validatePageRange()
- {
- pagesToInput.value = Math.max(1, Math.min(pageCount, Math.max(parseInt(pagesToInput.value), parseInt(pagesFromInput.value))));
- pagesFromInput.value = Math.max(1, Math.min(pageCount, Math.min(parseInt(pagesToInput.value), parseInt(pagesFromInput.value))));
- };
-
- mxEvent.addListener(pagesFromInput, 'change', validatePageRange);
- mxEvent.addListener(pagesToInput, 'change', validatePageRange);
-
- if (editorUi.pages != null)
- {
- pageCount = editorUi.pages.length;
-
- if (editorUi.currentPage != null)
- {
- for (var i = 0; i < editorUi.pages.length; i++)
- {
- if (editorUi.currentPage == editorUi.pages[i])
- {
- currentPage = i + 1;
- pagesFromInput.value = currentPage;
- pagesToInput.value = currentPage;
- break;
- }
- }
- }
- }
-
- pagesFromInput.setAttribute('max', pageCount);
- pagesToInput.setAttribute('max', pageCount);
-
- if (pageCount > 1)
- {
- div.appendChild(pagesSection);
- }
-
- // Adjust to ...
- var adjustSection = document.createElement('div');
- adjustSection.style.marginBottom = '10px';
-
- var adjustRadio = document.createElement('input');
- adjustRadio.style.marginRight = '8px';
-
- adjustRadio.setAttribute('value', 'adjust');
- adjustRadio.setAttribute('type', 'radio');
- adjustRadio.setAttribute('name', 'printZoom');
- adjustSection.appendChild(adjustRadio);
-
- var span = document.createElement('span');
- mxUtils.write(span, mxResources.get('adjustTo'));
- adjustSection.appendChild(span);
-
- var zoomInput = document.createElement('input');
- zoomInput.style.cssText = 'margin:0 8px 0 8px;';
- zoomInput.setAttribute('value', '100 %');
- zoomInput.style.width = '50px';
- adjustSection.appendChild(zoomInput);
-
- mxEvent.addListener(zoomInput, 'focus', function()
- {
- adjustRadio.checked = true;
- });
-
- div.appendChild(adjustSection);
-
- // Fit to ...
- var fitSection = pagesSection.cloneNode(false);
-
- var fitRadio = adjustRadio.cloneNode(true);
- fitRadio.setAttribute('value', 'fit');
- adjustRadio.setAttribute('checked', 'checked');
-
- var spanFitRadio = document.createElement('div');
- spanFitRadio.style.cssText = 'display:inline-block;height:100%;vertical-align:top;padding-top:2px;';
- spanFitRadio.appendChild(fitRadio);
- fitSection.appendChild(spanFitRadio);
-
- var table = document.createElement('table');
- table.style.display = 'inline-block';
- var tbody = document.createElement('tbody');
-
- var row1 = document.createElement('tr');
- var row2 = row1.cloneNode(true);
-
- var td1 = document.createElement('td');
- var td2 = td1.cloneNode(true);
- var td3 = td1.cloneNode(true);
-
- var td4 = td1.cloneNode(true);
- var td5 = td1.cloneNode(true);
- var td6 = td1.cloneNode(true);
-
- td1.style.textAlign = 'right';
- td4.style.textAlign = 'right';
-
- mxUtils.write(td1, mxResources.get('fitTo'));
-
- var sheetsAcrossInput = document.createElement('input');
- sheetsAcrossInput.style.cssText = 'margin:0 8px 0 8px;';
- sheetsAcrossInput.setAttribute('value', '1');
- sheetsAcrossInput.setAttribute('min', '1');
- sheetsAcrossInput.setAttribute('type', 'number');
- sheetsAcrossInput.style.width = '40px';
- td2.appendChild(sheetsAcrossInput);
-
- var span = document.createElement('span');
- mxUtils.write(span, mxResources.get('fitToSheetsAcross'));
- td3.appendChild(span);
-
- mxUtils.write(td4, mxResources.get('fitToBy'));
-
- var sheetsDownInput = sheetsAcrossInput.cloneNode(true);
- td5.appendChild(sheetsDownInput);
-
- mxEvent.addListener(sheetsAcrossInput, 'focus', function()
- {
- fitRadio.checked = true;
- });
-
- mxEvent.addListener(sheetsDownInput, 'focus', function()
- {
- fitRadio.checked = true;
- });
-
- var span = document.createElement('span');
- mxUtils.write(span, mxResources.get('fitToSheetsDown'));
- td6.appendChild(span);
-
- row1.appendChild(td1);
- row1.appendChild(td2);
- row1.appendChild(td3);
-
- row2.appendChild(td4);
- row2.appendChild(td5);
- row2.appendChild(td6);
-
- tbody.appendChild(row1);
- tbody.appendChild(row2);
- table.appendChild(tbody);
- fitSection.appendChild(table);
-
- div.appendChild(fitSection);
-
- // Page scale ...
- var pageScaleSection = document.createElement('div');
-
- var span = document.createElement('div');
- span.style.fontWeight = 'bold';
- span.style.marginBottom = '12px';
- mxUtils.write(span, mxResources.get('paperSize'));
- pageScaleSection.appendChild(span);
-
- var span = document.createElement('div');
- span.style.marginBottom = '12px';
-
- var accessor = PageSetupDialog.addPageFormatPanel(span, 'printdialog',
- editorUi.editor.graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT);
- pageScaleSection.appendChild(span);
-
- var span = document.createElement('span');
- mxUtils.write(span, mxResources.get('pageScale'));
- pageScaleSection.appendChild(span);
-
- var pageScaleInput = document.createElement('input');
- pageScaleInput.style.cssText = 'margin:0 8px 0 8px;';
- pageScaleInput.setAttribute('value', '100 %');
- pageScaleInput.style.width = '60px';
- pageScaleSection.appendChild(pageScaleInput);
-
- div.appendChild(pageScaleSection);
-
- // Buttons
- var buttons = document.createElement('div');
- buttons.style.cssText = 'text-align:right;margin:62px 0 0 0;';
-
- // Overall scale for print-out to account for print borders in dialogs etc
- function preview(print)
- {
- var printScale = parseInt(pageScaleInput.value) / 100;
-
- if (isNaN(printScale))
- {
- printScale = 1;
- pageScaleInput.value = '100 %';
- }
-
- // Workaround to match available paper size in actual print output
- printScale *= 0.75;
-
- function printGraph(thisGraph, pv, forcePageBreaks)
- {
- // Negative coordinates are cropped or shifted if page visible
- var gb = thisGraph.getGraphBounds();
- var border = 0;
- var x0 = 0;
- var y0 = 0;
-
- var pf = accessor.get();
- var scale = 1 / thisGraph.pageScale;
- var autoOrigin = fitRadio.checked;
-
- if (autoOrigin)
- {
- var h = parseInt(sheetsAcrossInput.value);
- var v = parseInt(sheetsDownInput.value);
-
- scale = Math.min((pf.height * v) / (gb.height / thisGraph.view.scale),
- (pf.width * h) / (gb.width / thisGraph.view.scale));
- }
- else
- {
- scale = parseInt(zoomInput.value) / (100 * thisGraph.pageScale);
-
- if (isNaN(scale))
- {
- printScale = 1 / thisGraph.pageScale;
- zoomInput.value = '100 %';
- }
- }
-
- // Applies print scale
- pf = mxRectangle.fromRectangle(pf);
- pf.width = Math.ceil(pf.width * printScale);
- pf.height = Math.ceil(pf.height * printScale);
- scale *= printScale;
-
- // Starts at first visible page
- if (!autoOrigin && thisGraph.pageVisible)
- {
- var layout = thisGraph.getPageLayout();
- x0 -= layout.x * pf.width;
- y0 -= layout.y * pf.height;
- }
- else
- {
- autoOrigin = true;
- }
-
- if (pv == null)
- {
- pv = PrintDialog.createPrintPreview(thisGraph, scale, pf, border, x0, y0, autoOrigin);
- pv.pageSelector = false;
- pv.mathEnabled = false;
-
- if (typeof(MathJax) !== 'undefined')
- {
- // Adds class to ignore if math is disabled
- var printPreviewRenderPage = pv.renderPage;
-
- pv.renderPage = function(w, h, dx, dy, content, pageNumber)
- {
- var result = printPreviewRenderPage.apply(this, arguments);
-
- if (this.graph.mathEnabled)
- {
- this.mathEnabled = true;
- }
- else
- {
- result.className = 'geDisableMathJax';
- }
-
- return result;
- };
- }
-
- pv.open(null, null, forcePageBreaks, true);
- }
- else
- {
- var bg = thisGraph.background;
-
- if (bg == null || bg == '' || bg == mxConstants.NONE)
- {
- bg = '#ffffff';
- }
-
- pv.backgroundColor = bg;
- pv.autoOrigin = autoOrigin;
- pv.appendGraph(thisGraph, scale, x0, y0, forcePageBreaks, true);
- }
-
- return pv;
- };
-
- var pagesFrom = pagesFromInput.value;
- var pagesTo = pagesToInput.value;
- var ignorePages = !allPagesRadio.checked;
- var pv = null;
-
- if (ignorePages)
- {
- ignorePages = pagesFrom == currentPage && pagesTo == currentPage;
- }
-
- if (!ignorePages && editorUi.pages != null && editorUi.pages.length)
- {
- var i0 = 0;
- var imax = editorUi.pages.length - 1;
-
- if (!allPagesRadio.checked)
- {
- i0 = parseInt(pagesFrom) - 1;
- imax = parseInt(pagesTo) - 1;
- }
-
- for (var i = i0; i <= imax; i++)
- {
- var page = editorUi.pages[i];
- var tempGraph = (page == editorUi.currentPage) ? graph : null;
-
- if (tempGraph == null)
- {
- tempGraph = editorUi.createTemporaryGraph(graph.getStylesheet());
-
- // Restores graph settings that are relevant for printing
- var pageVisible = true;
- var mathEnabled = false;
- var bg = null;
- var bgImage = null;
-
- if (page.viewState == null && page.mapping == null)
- {
- // Workaround to extract view state from XML node
- // This changes the state of the page and parses
- // the XML for the graph model even if not needed.
- if (page.root == null)
- {
- editorUi.updatePageRoot(page);
- }
- }
-
- if (page.viewState != null)
- {
- pageVisible = page.viewState.pageVisible;
- mathEnabled = page.viewState.mathEnabled;
- bg = page.viewState.background;
- bgImage = page.viewState.backgroundImage;
- }
- else if (page.mapping != null && page.mapping.diagramMap != null)
- {
- // Default pageVisible in realtime is true
- mathEnabled = page.mapping.diagramMap.get('mathEnabled') != '0';
- bg = page.mapping.diagramMap.get('background');
-
- var temp = page.mapping.diagramMap.get('backgroundImage');
- bgImage = (temp != null && temp.length > 0) ? JSON.parse(temp) : null;
- }
-
- tempGraph.background = bg;
- tempGraph.backgroundImage = (bgImage != null) ? new mxImage(bgImage.src, bgImage.width, bgImage.height) : null;
- tempGraph.pageVisible = pageVisible;
- tempGraph.mathEnabled = mathEnabled;
-
- // Redirects placeholders to current page
- var graphGetGlobalVariable = tempGraph.getGlobalVariable;
-
- tempGraph.getGlobalVariable = function(name)
- {
- if (name == 'page')
- {
- return page.getName();
- }
- else if (name == 'pagenumber')
- {
- return i + 1;
- }
-
- return graphGetGlobalVariable.apply(this, arguments);
- };
-
- document.body.appendChild(tempGraph.container);
- editorUi.updatePageRoot(page);
- tempGraph.model.setRoot(page.root);
- }
-
- pv = printGraph(tempGraph, pv, i != imax);
-
- if (tempGraph != graph)
- {
- tempGraph.container.parentNode.removeChild(tempGraph.container);
- }
- }
- }
- else
- {
- pv = printGraph(graph);
- }
-
- if (pv.mathEnabled)
- {
- var doc = pv.wnd.document;
-
- doc.writeln('<script type="text/x-mathjax-config">');
- doc.writeln('MathJax.Hub.Config({');
- doc.writeln('messageStyle: "none",');
- doc.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],');
- doc.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],');
- doc.writeln('TeX: {');
- doc.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]');
- doc.writeln('},');
- // Ignores math in in-place editor
- doc.writeln('tex2jax: {');
- doc.writeln(' ignoreClass: "geDisableMathJax"');
- doc.writeln('},');
- doc.writeln('asciimath2jax: {');
- doc.writeln(' ignoreClass: "geDisableMathJax"');
- doc.writeln('}');
- doc.writeln('});');
-
- // Adds asynchronous printing when MathJax finished rendering
- if (print)
- {
- doc.writeln('MathJax.Hub.Queue(function () {');
- doc.writeln('window.print();');
- doc.writeln('});');
- }
-
- doc.writeln('</script>');
- doc.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>');
- }
-
- pv.closeDocument();
-
- if (!pv.mathEnabled && print)
- {
- PrintDialog.printPreview(pv);
- }
- };
-
- var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
- {
- editorUi.hideDialog();
- });
- cancelBtn.className = 'geBtn';
-
- if (editorUi.editor.cancelFirst)
- {
- buttons.appendChild(cancelBtn);
- }
-
- if (!editorUi.isOffline())
- {
- var helpBtn = mxUtils.button(mxResources.get('help'), function()
- {
- window.open('https://desk.draw.io/support/solutions/articles/16000048947');
- });
-
- helpBtn.className = 'geBtn';
- buttons.appendChild(helpBtn);
- }
-
- if (PrintDialog.previewEnabled)
- {
- var previewBtn = mxUtils.button(mxResources.get('preview'), function()
- {
- editorUi.hideDialog();
- preview(false);
- });
- previewBtn.className = 'geBtn';
- buttons.appendChild(previewBtn);
- }
-
- var printBtn = mxUtils.button(mxResources.get((!PrintDialog.previewEnabled) ? 'ok' : 'print'), function()
- {
- editorUi.hideDialog();
- preview(true);
- });
- printBtn.className = 'geBtn gePrimaryBtn';
- buttons.appendChild(printBtn);
-
- if (!editorUi.editor.cancelFirst)
- {
- buttons.appendChild(cancelBtn);
- }
-
- div.appendChild(buttons);
-
- this.container = div;
-};
-
-/**
* Overrides link dialog to add Google Picker.
*/
var LinkDialog = function(editorUi, initialValue, btnLabel, fn)
diff --git a/war/js/diagramly/Editor.js b/war/js/diagramly/Editor.js
index b4d3627d..0d2934fd 100644
--- a/war/js/diagramly/Editor.js
+++ b/war/js/diagramly/Editor.js
@@ -1322,4 +1322,556 @@
return mxMarkerCreateMarker.apply(this, arguments);
};
+
+ /**
+ * Constructs a new print dialog.
+ */
+ PrintDialog.prototype.create = function(editorUi, titleText)
+ {
+ var graph = editorUi.editor.graph;
+ var div = document.createElement('div');
+
+ var title = document.createElement('h3');
+ title.style.width = '100%';
+ title.style.textAlign = 'center';
+ title.style.marginTop = '0px';
+ mxUtils.write(title, titleText || mxResources.get('print'));
+ div.appendChild(title);
+
+ var pageCount = 1;
+ var currentPage = 1;
+
+ // Pages
+ var pagesSection = document.createElement('div');
+ pagesSection.style.cssText = 'border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;';
+
+ var allPagesRadio = document.createElement('input');
+ allPagesRadio.style.cssText = 'margin-right:8px;margin-bottom:8px;';
+ allPagesRadio.setAttribute('value', 'all');
+ allPagesRadio.setAttribute('type', 'radio');
+ allPagesRadio.setAttribute('name', 'pages-printdialog');
+
+ pagesSection.appendChild(allPagesRadio);
+
+ var span = document.createElement('span');
+ mxUtils.write(span, mxResources.get('printAllPages'));
+ pagesSection.appendChild(span);
+
+ mxUtils.br(pagesSection);
+
+ // Pages ... to ...
+ var pagesRadio = allPagesRadio.cloneNode(true);
+ allPagesRadio.setAttribute('checked', 'checked');
+ pagesRadio.setAttribute('value', 'range');
+ pagesSection.appendChild(pagesRadio);
+
+ var span = document.createElement('span');
+ mxUtils.write(span, mxResources.get('pages') + ':');
+ pagesSection.appendChild(span);
+
+ var pagesFromInput = document.createElement('input');
+ pagesFromInput.style.cssText = 'margin:0 8px 0 8px;'
+ pagesFromInput.setAttribute('value', '1');
+ pagesFromInput.setAttribute('type', 'number');
+ pagesFromInput.setAttribute('min', '1');
+ pagesFromInput.style.width = '50px';
+ pagesSection.appendChild(pagesFromInput);
+
+ var span = document.createElement('span');
+ mxUtils.write(span, mxResources.get('to'));
+ pagesSection.appendChild(span);
+
+ var pagesToInput = pagesFromInput.cloneNode(true);
+ pagesSection.appendChild(pagesToInput);
+
+ mxEvent.addListener(pagesFromInput, 'focus', function()
+ {
+ pagesRadio.checked = true;
+ });
+
+ mxEvent.addListener(pagesToInput, 'focus', function()
+ {
+ pagesRadio.checked = true;
+ });
+
+ function validatePageRange()
+ {
+ pagesToInput.value = Math.max(1, Math.min(pageCount, Math.max(parseInt(pagesToInput.value), parseInt(pagesFromInput.value))));
+ pagesFromInput.value = Math.max(1, Math.min(pageCount, Math.min(parseInt(pagesToInput.value), parseInt(pagesFromInput.value))));
+ };
+
+ mxEvent.addListener(pagesFromInput, 'change', validatePageRange);
+ mxEvent.addListener(pagesToInput, 'change', validatePageRange);
+
+ if (editorUi.pages != null)
+ {
+ pageCount = editorUi.pages.length;
+
+ if (editorUi.currentPage != null)
+ {
+ for (var i = 0; i < editorUi.pages.length; i++)
+ {
+ if (editorUi.currentPage == editorUi.pages[i])
+ {
+ currentPage = i + 1;
+ pagesFromInput.value = currentPage;
+ pagesToInput.value = currentPage;
+ break;
+ }
+ }
+ }
+ }
+
+ pagesFromInput.setAttribute('max', pageCount);
+ pagesToInput.setAttribute('max', pageCount);
+
+ if (pageCount > 1)
+ {
+ div.appendChild(pagesSection);
+ }
+
+ // Adjust to ...
+ var adjustSection = document.createElement('div');
+ adjustSection.style.marginBottom = '10px';
+
+ var adjustRadio = document.createElement('input');
+ adjustRadio.style.marginRight = '8px';
+
+ adjustRadio.setAttribute('value', 'adjust');
+ adjustRadio.setAttribute('type', 'radio');
+ adjustRadio.setAttribute('name', 'printZoom');
+ adjustSection.appendChild(adjustRadio);
+
+ var span = document.createElement('span');
+ mxUtils.write(span, mxResources.get('adjustTo'));
+ adjustSection.appendChild(span);
+
+ var zoomInput = document.createElement('input');
+ zoomInput.style.cssText = 'margin:0 8px 0 8px;';
+ zoomInput.setAttribute('value', '100 %');
+ zoomInput.style.width = '50px';
+ adjustSection.appendChild(zoomInput);
+
+ mxEvent.addListener(zoomInput, 'focus', function()
+ {
+ adjustRadio.checked = true;
+ });
+
+ div.appendChild(adjustSection);
+
+ // Fit to ...
+ var fitSection = pagesSection.cloneNode(false);
+
+ var fitRadio = adjustRadio.cloneNode(true);
+ fitRadio.setAttribute('value', 'fit');
+ adjustRadio.setAttribute('checked', 'checked');
+
+ var spanFitRadio = document.createElement('div');
+ spanFitRadio.style.cssText = 'display:inline-block;height:100%;vertical-align:top;padding-top:2px;';
+ spanFitRadio.appendChild(fitRadio);
+ fitSection.appendChild(spanFitRadio);
+
+ var table = document.createElement('table');
+ table.style.display = 'inline-block';
+ var tbody = document.createElement('tbody');
+
+ var row1 = document.createElement('tr');
+ var row2 = row1.cloneNode(true);
+
+ var td1 = document.createElement('td');
+ var td2 = td1.cloneNode(true);
+ var td3 = td1.cloneNode(true);
+
+ var td4 = td1.cloneNode(true);
+ var td5 = td1.cloneNode(true);
+ var td6 = td1.cloneNode(true);
+
+ td1.style.textAlign = 'right';
+ td4.style.textAlign = 'right';
+
+ mxUtils.write(td1, mxResources.get('fitTo'));
+
+ var sheetsAcrossInput = document.createElement('input');
+ sheetsAcrossInput.style.cssText = 'margin:0 8px 0 8px;';
+ sheetsAcrossInput.setAttribute('value', '1');
+ sheetsAcrossInput.setAttribute('min', '1');
+ sheetsAcrossInput.setAttribute('type', 'number');
+ sheetsAcrossInput.style.width = '40px';
+ td2.appendChild(sheetsAcrossInput);
+
+ var span = document.createElement('span');
+ mxUtils.write(span, mxResources.get('fitToSheetsAcross'));
+ td3.appendChild(span);
+
+ mxUtils.write(td4, mxResources.get('fitToBy'));
+
+ var sheetsDownInput = sheetsAcrossInput.cloneNode(true);
+ td5.appendChild(sheetsDownInput);
+
+ mxEvent.addListener(sheetsAcrossInput, 'focus', function()
+ {
+ fitRadio.checked = true;
+ });
+
+ mxEvent.addListener(sheetsDownInput, 'focus', function()
+ {
+ fitRadio.checked = true;
+ });
+
+ var span = document.createElement('span');
+ mxUtils.write(span, mxResources.get('fitToSheetsDown'));
+ td6.appendChild(span);
+
+ row1.appendChild(td1);
+ row1.appendChild(td2);
+ row1.appendChild(td3);
+
+ row2.appendChild(td4);
+ row2.appendChild(td5);
+ row2.appendChild(td6);
+
+ tbody.appendChild(row1);
+ tbody.appendChild(row2);
+ table.appendChild(tbody);
+ fitSection.appendChild(table);
+
+ div.appendChild(fitSection);
+
+ // Page scale ...
+ var pageScaleSection = document.createElement('div');
+
+ var span = document.createElement('div');
+ span.style.fontWeight = 'bold';
+ span.style.marginBottom = '12px';
+ mxUtils.write(span, mxResources.get('paperSize'));
+ pageScaleSection.appendChild(span);
+
+ var span = document.createElement('div');
+ span.style.marginBottom = '12px';
+
+ var accessor = PageSetupDialog.addPageFormatPanel(span, 'printdialog',
+ editorUi.editor.graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT);
+ pageScaleSection.appendChild(span);
+
+ var span = document.createElement('span');
+ mxUtils.write(span, mxResources.get('pageScale'));
+ pageScaleSection.appendChild(span);
+
+ var pageScaleInput = document.createElement('input');
+ pageScaleInput.style.cssText = 'margin:0 8px 0 8px;';
+ pageScaleInput.setAttribute('value', '100 %');
+ pageScaleInput.style.width = '60px';
+ pageScaleSection.appendChild(pageScaleInput);
+
+ div.appendChild(pageScaleSection);
+
+ // Buttons
+ var buttons = document.createElement('div');
+ buttons.style.cssText = 'text-align:right;margin:62px 0 0 0;';
+
+ // Overall scale for print-out to account for print borders in dialogs etc
+ function preview(print)
+ {
+ var printScale = parseInt(pageScaleInput.value) / 100;
+
+ if (isNaN(printScale))
+ {
+ printScale = 1;
+ pageScaleInput.value = '100 %';
+ }
+
+ // Workaround to match available paper size in actual print output
+ printScale *= 0.75;
+
+ function printGraph(thisGraph, pv, forcePageBreaks)
+ {
+ // Negative coordinates are cropped or shifted if page visible
+ var gb = thisGraph.getGraphBounds();
+ var border = 0;
+ var x0 = 0;
+ var y0 = 0;
+
+ var pf = accessor.get();
+ var scale = 1 / thisGraph.pageScale;
+ var autoOrigin = fitRadio.checked;
+
+ if (autoOrigin)
+ {
+ var h = parseInt(sheetsAcrossInput.value);
+ var v = parseInt(sheetsDownInput.value);
+
+ scale = Math.min((pf.height * v) / (gb.height / thisGraph.view.scale),
+ (pf.width * h) / (gb.width / thisGraph.view.scale));
+ }
+ else
+ {
+ scale = parseInt(zoomInput.value) / (100 * thisGraph.pageScale);
+
+ if (isNaN(scale))
+ {
+ printScale = 1 / thisGraph.pageScale;
+ zoomInput.value = '100 %';
+ }
+ }
+
+ // Applies print scale
+ pf = mxRectangle.fromRectangle(pf);
+ pf.width = Math.ceil(pf.width * printScale);
+ pf.height = Math.ceil(pf.height * printScale);
+ scale *= printScale;
+
+ // Starts at first visible page
+ if (!autoOrigin && thisGraph.pageVisible)
+ {
+ var layout = thisGraph.getPageLayout();
+ x0 -= layout.x * pf.width;
+ y0 -= layout.y * pf.height;
+ }
+ else
+ {
+ autoOrigin = true;
+ }
+
+ if (pv == null)
+ {
+ pv = PrintDialog.createPrintPreview(thisGraph, scale, pf, border, x0, y0, autoOrigin);
+ pv.pageSelector = false;
+ pv.mathEnabled = false;
+
+ if (typeof(MathJax) !== 'undefined')
+ {
+ // Adds class to ignore if math is disabled
+ var printPreviewRenderPage = pv.renderPage;
+
+ pv.renderPage = function(w, h, dx, dy, content, pageNumber)
+ {
+ var result = printPreviewRenderPage.apply(this, arguments);
+
+ if (this.graph.mathEnabled)
+ {
+ this.mathEnabled = true;
+ }
+ else
+ {
+ result.className = 'geDisableMathJax';
+ }
+
+ return result;
+ };
+ }
+
+ pv.open(null, null, forcePageBreaks, true);
+ }
+ else
+ {
+ var bg = thisGraph.background;
+
+ if (bg == null || bg == '' || bg == mxConstants.NONE)
+ {
+ bg = '#ffffff';
+ }
+
+ pv.backgroundColor = bg;
+ pv.autoOrigin = autoOrigin;
+ pv.appendGraph(thisGraph, scale, x0, y0, forcePageBreaks, true);
+ }
+
+ return pv;
+ };
+
+ var pagesFrom = pagesFromInput.value;
+ var pagesTo = pagesToInput.value;
+ var ignorePages = !allPagesRadio.checked;
+ var pv = null;
+
+ if (ignorePages)
+ {
+ ignorePages = pagesFrom == currentPage && pagesTo == currentPage;
+ }
+
+ if (!ignorePages && editorUi.pages != null && editorUi.pages.length)
+ {
+ var i0 = 0;
+ var imax = editorUi.pages.length - 1;
+
+ if (!allPagesRadio.checked)
+ {
+ i0 = parseInt(pagesFrom) - 1;
+ imax = parseInt(pagesTo) - 1;
+ }
+
+ for (var i = i0; i <= imax; i++)
+ {
+ var page = editorUi.pages[i];
+ var tempGraph = (page == editorUi.currentPage) ? graph : null;
+
+ if (tempGraph == null)
+ {
+ tempGraph = editorUi.createTemporaryGraph(graph.getStylesheet());
+
+ // Restores graph settings that are relevant for printing
+ var pageVisible = true;
+ var mathEnabled = false;
+ var bg = null;
+ var bgImage = null;
+
+ if (page.viewState == null && page.mapping == null)
+ {
+ // Workaround to extract view state from XML node
+ // This changes the state of the page and parses
+ // the XML for the graph model even if not needed.
+ if (page.root == null)
+ {
+ editorUi.updatePageRoot(page);
+ }
+ }
+
+ if (page.viewState != null)
+ {
+ pageVisible = page.viewState.pageVisible;
+ mathEnabled = page.viewState.mathEnabled;
+ bg = page.viewState.background;
+ bgImage = page.viewState.backgroundImage;
+ }
+ else if (page.mapping != null && page.mapping.diagramMap != null)
+ {
+ // Default pageVisible in realtime is true
+ mathEnabled = page.mapping.diagramMap.get('mathEnabled') != '0';
+ bg = page.mapping.diagramMap.get('background');
+
+ var temp = page.mapping.diagramMap.get('backgroundImage');
+ bgImage = (temp != null && temp.length > 0) ? JSON.parse(temp) : null;
+ }
+
+ tempGraph.background = bg;
+ tempGraph.backgroundImage = (bgImage != null) ? new mxImage(bgImage.src, bgImage.width, bgImage.height) : null;
+ tempGraph.pageVisible = pageVisible;
+ tempGraph.mathEnabled = mathEnabled;
+
+ // Redirects placeholders to current page
+ var graphGetGlobalVariable = tempGraph.getGlobalVariable;
+
+ tempGraph.getGlobalVariable = function(name)
+ {
+ if (name == 'page')
+ {
+ return page.getName();
+ }
+ else if (name == 'pagenumber')
+ {
+ return i + 1;
+ }
+
+ return graphGetGlobalVariable.apply(this, arguments);
+ };
+
+ document.body.appendChild(tempGraph.container);
+ editorUi.updatePageRoot(page);
+ tempGraph.model.setRoot(page.root);
+ }
+
+ pv = printGraph(tempGraph, pv, i != imax);
+
+ if (tempGraph != graph)
+ {
+ tempGraph.container.parentNode.removeChild(tempGraph.container);
+ }
+ }
+ }
+ else
+ {
+ pv = printGraph(graph);
+ }
+
+ if (pv.mathEnabled)
+ {
+ var doc = pv.wnd.document;
+
+ doc.writeln('<script type="text/x-mathjax-config">');
+ doc.writeln('MathJax.Hub.Config({');
+ doc.writeln('messageStyle: "none",');
+ doc.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],');
+ doc.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],');
+ doc.writeln('TeX: {');
+ doc.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]');
+ doc.writeln('},');
+ // Ignores math in in-place editor
+ doc.writeln('tex2jax: {');
+ doc.writeln(' ignoreClass: "geDisableMathJax"');
+ doc.writeln('},');
+ doc.writeln('asciimath2jax: {');
+ doc.writeln(' ignoreClass: "geDisableMathJax"');
+ doc.writeln('}');
+ doc.writeln('});');
+
+ // Adds asynchronous printing when MathJax finished rendering
+ if (print)
+ {
+ doc.writeln('MathJax.Hub.Queue(function () {');
+ doc.writeln('window.print();');
+ doc.writeln('});');
+ }
+
+ doc.writeln('</script>');
+ doc.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>');
+ }
+
+ pv.closeDocument();
+
+ if (!pv.mathEnabled && print)
+ {
+ PrintDialog.printPreview(pv);
+ }
+ };
+
+ var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
+ {
+ editorUi.hideDialog();
+ });
+ cancelBtn.className = 'geBtn';
+
+ if (editorUi.editor.cancelFirst)
+ {
+ buttons.appendChild(cancelBtn);
+ }
+
+ if (!editorUi.isOffline())
+ {
+ var helpBtn = mxUtils.button(mxResources.get('help'), function()
+ {
+ window.open('https://desk.draw.io/support/solutions/articles/16000048947');
+ });
+
+ helpBtn.className = 'geBtn';
+ buttons.appendChild(helpBtn);
+ }
+
+ if (PrintDialog.previewEnabled)
+ {
+ var previewBtn = mxUtils.button(mxResources.get('preview'), function()
+ {
+ editorUi.hideDialog();
+ preview(false);
+ });
+ previewBtn.className = 'geBtn';
+ buttons.appendChild(previewBtn);
+ }
+
+ var printBtn = mxUtils.button(mxResources.get((!PrintDialog.previewEnabled) ? 'ok' : 'print'), function()
+ {
+ editorUi.hideDialog();
+ preview(true);
+ });
+ printBtn.className = 'geBtn gePrimaryBtn';
+ buttons.appendChild(printBtn);
+
+ if (!editorUi.editor.cancelFirst)
+ {
+ buttons.appendChild(cancelBtn);
+ }
+
+ div.appendChild(buttons);
+
+ this.container = div;
+ };
})();
diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js
index 5c7b5da7..5360f9cc 100644
--- a/war/js/diagramly/EditorUi.js
+++ b/war/js/diagramly/EditorUi.js
@@ -5689,14 +5689,18 @@
this.editor.graph.addSvgShadow(graph.view.canvas.ownerSVGElement, null, true);
}
- /**
- * Specifies the default filename.
- */
+ // Overrides print dialog size
+ ui.actions.get('print').funct = function()
+ {
+ ui.showDialog(new PrintDialog(ui).container, 360,
+ (ui.pages != null && ui.pages.length > 1) ?
+ 420 : 360, true, true);
+ };
+
+ // Specifies the default filename
this.defaultFilename = mxResources.get('untitledDiagram');
- /**
- * Adds placeholder for %page% and %pagenumber%
- */
+ // Adds placeholder for %page% and %pagenumber%
var graphGetGlobalVariable = graph.getGlobalVariable;
graph.getGlobalVariable = function(name)
@@ -5720,9 +5724,7 @@
return graphGetGlobalVariable.apply(this, arguments);
};
- /**
- * Overrides editor filename.
- */
+ // Overrides editor filename
this.editor.getOrCreateFilename = function()
{
var filename = ui.defaultFilename;
@@ -8383,6 +8385,16 @@
this.menubarContainer.appendChild(this.offlineStatus);
+ mxEvent.addListener(this.offlineStatus, 'click', mxUtils.bind(this, function()
+ {
+ var img = this.offlineStatus.getElementsByTagName('img');
+
+ if (img != null && img.length > 0)
+ {
+ this.alert(img[0].getAttribute('title'));
+ }
+ }));
+
var appCache = window.applicationCache;
function getImageTagForStatus(status)
@@ -8396,10 +8408,10 @@
return '<img title="Cached" border="0" src="' + IMAGE_PATH + '/checkmark.gif"/>';
break;
case appCache.CHECKING: // CHECKING == 2
- return '<img title="Checking..." border="0" src="' + IMAGE_PATH + '/spin.gif"/>';
+ return '<img title="Checking/Downloading..." border="0" src="' + IMAGE_PATH + '/spin.gif"/>';
break;
case appCache.DOWNLOADING: // DOWNLOADING == 3
- return '<img title="Downloading..." border="0" src="' + IMAGE_PATH + '/spin.gif"/>';
+ return '<img title="Checking/Downloading..." border="0" src="' + IMAGE_PATH + '/spin.gif"/>';
break;
case appCache.UPDATEREADY: // UPDATEREADY == 4
return '<img title="Update ready" border="0" src="' + IMAGE_PATH + '/download.png"/>';
@@ -8415,7 +8427,12 @@
var updateStatus = mxUtils.bind(this, function()
{
- this.offlineStatus.innerHTML = getImageTagForStatus(appCache.status);
+ var tmp = getImageTagForStatus(appCache.status);
+
+ if (this.offlineStatus.innerHTML != tmp)
+ {
+ this.offlineStatus.innerHTML = tmp;
+ }
});
mxEvent.addListener(appCache, 'checking', updateStatus);
diff --git a/war/js/diagramly/GraphViewer.js b/war/js/diagramly/GraphViewer.js
index 76870d63..63fb385c 100644
--- a/war/js/diagramly/GraphViewer.js
+++ b/war/js/diagramly/GraphViewer.js
@@ -1331,6 +1331,21 @@ GraphViewer.prototype.showLocalLightbox = function()
return self.getImageUrl(key);
};
+ // Handles relative images in print output and temporary graphs
+ var uiCreateTemporaryGraph = ui.createTemporaryGraph;
+
+ ui.createTemporaryGraph = function()
+ {
+ var graph = uiCreateTemporaryGraph.apply(this, arguments);
+
+ graph.getImageFromBundles = function(key)
+ {
+ return self.getImageUrl(key);
+ };
+
+ return graph;
+ };
+
if (this.graphConfig.move)
{
graph.isMoveCellsEvent = function(evt)
@@ -1570,7 +1585,15 @@ GraphViewer.initCss = function()
'background-color:#cccccc;',
'border:none;',
'height:1px;}',
- 'table.mxPopupMenu tr { font-size:4pt;}'].join('\n');
+ 'table.mxPopupMenu tr { font-size:4pt;}',
+ // Modified to only apply to the print dialog
+ '.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;',
+ 'font-size:10pt;',
+ 'border:none;',
+ 'margin:0px;}',
+ // These are required for the print dialog
+ '.geDialog { position:absolute; background:white; overflow:hidden; padding:30px; border:1px solid #acacac; -webkit-box-shadow:0px 0px 2px 2px #d5d5d5; -moz-box-shadow:0px 0px 2px 2px #d5d5d5; box-shadow:0px 0px 2px 2px #d5d5d5; _filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color=\'#d5d5d5\', Positive=\'true\'); z-index: 2;}.geDialogClose { position:absolute; width:9px; height:9px; opacity:0.5; cursor:pointer; _filter:alpha(opacity=50);}.geDialogClose:hover { opacity:1;}.geDialogTitle { box-sizing:border-box; white-space:nowrap; background:rgb(229, 229, 229); border-bottom:1px solid rgb(192, 192, 192); font-size:15px; font-weight:bold; text-align:center; color:rgb(35, 86, 149);}.geDialogFooter { background:whiteSmoke; white-space:nowrap; text-align:right; box-sizing:border-box; border-top:1px solid #e5e5e5; color:darkGray;}',
+ '.geBtn { background-color: #f5f5f5; border-radius: 2px; border: 1px solid #d8d8d8; color: #333; cursor: default; font-size: 11px; font-weight: bold; height: 29px; line-height: 27px; margin: 0 0 0 8px; min-width: 72px; outline: 0; padding: 0 8px; cursor: pointer;}.geBtn:hover, .geBtn:focus { -webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1); -moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1); box-shadow: 0px 1px 1px rgba(0,0,0,0.1); border: 1px solid #c6c6c6; background-color: #f8f8f8; background-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%); color: #111;}.geBtn:disabled { opacity: .5;}.gePrimaryBtn { background-color: #4d90fe; background-image: linear-gradient(#4d90fe 0px,#4787ed 100%); border: 1px solid #3079ed; color: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus { background-color: #357ae8; background-image: linear-gradient(#4d90fe 0px,#357ae8 100%); border: 1px solid #2f5bb7; color: #fff;}.gePrimaryBtn:disabled { opacity: .5;}'].join('\n');
document.getElementsByTagName('head')[0].appendChild(style)
}
catch (e)
diff --git a/war/js/diagramly/Menus.js b/war/js/diagramly/Menus.js
index 83e60a69..2495c5ac 100644
--- a/war/js/diagramly/Menus.js
+++ b/war/js/diagramly/Menus.js
@@ -81,13 +81,6 @@
dlg.init();
});
- editorUi.actions.get('print').funct = function()
- {
- editorUi.showDialog(new PrintDialog(editorUi).container, 360,
- (editorUi.pages != null && editorUi.pages.length > 1) ?
- 420 : 360, true, true);
- };
-
// Export PDF action for chrome OS (same as print with different dialog title)
editorUi.actions.addAction('exportPdf', function()
{
@@ -1843,20 +1836,6 @@
}
})));
- // Overrides arrange menu to add insert submenu
- this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent)
- {
- this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
- this.addSubmenu('direction', menu, parent);
- this.addMenuItems(menu, ['turn', '-'], parent);
- this.addSubmenu('align', menu, parent);
- this.addSubmenu('distribute', menu, parent);
- menu.addSeparator(parent);
- this.addSubmenu('navigation', menu, parent);
- this.addSubmenu('layout', menu, parent);
- this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'editGeometry', 'clearWaypoints', 'autosize'], parent);
- })));
-
var methods = ['horizontalFlow', 'verticalFlow', '-', 'horizontalTree', 'verticalTree', '-', 'organic', 'circle', '-', 'fromText'];
var addInsertItem = function(menu, parent, title, method)
@@ -2324,8 +2303,6 @@
menu.addSeparator(parent);
}
- this.addSubmenu('insert', menu, parent);
- menu.addSeparator(parent);
this.addMenuItems(menu, ['copyConnect', 'collapseExpand', '-'], parent);
if (typeof(MathJax) !== 'undefined')
diff --git a/war/js/diagramly/vsdx/VsdxExport.js b/war/js/diagramly/vsdx/VsdxExport.js
index 00604a97..1398cb7a 100644
--- a/war/js/diagramly/vsdx/VsdxExport.js
+++ b/war/js/diagramly/vsdx/VsdxExport.js
@@ -105,8 +105,8 @@ function VsdxExport(editorUi, resDir)
var row = xmlDoc.createElement("Row");
row.setAttribute("T", type);
row.setAttribute("IX", index);
- row.appendChild(createCellElem("X", x, xmlDoc));
- row.appendChild(createCellElem("Y", y, xmlDoc));
+ row.appendChild(createCellElemScaled("X", x, xmlDoc));
+ row.appendChild(createCellElemScaled("Y", y, xmlDoc));
return row;
};
@@ -294,6 +294,131 @@ function VsdxExport(editorUi, resDir)
return shape;
};
+
+ function getArrowType(arrow, isFilled)
+ {
+ isFilled = isFilled == null? "1" : isFilled;
+ arrow = arrow == null? "none" : arrow;
+ var key = arrow + "|" + isFilled;
+ var type = that.ARROWS_MAP[key];
+ if (type != null)
+ return type;
+ else
+ return 1;
+ };
+
+ function getArrowSize(size)
+ {
+ if (size == null) return 2;
+
+ if (size <=2)
+ return 0;
+ else if (size <= 3)
+ return 1;
+ else if (size <= 5)
+ return 2;
+ else if (size <= 7)
+ return 3;
+ else if (size <= 9)
+ return 4;
+ else if (size <= 22)
+ return 5;
+ else
+ return 6;
+ };
+
+ function convertMxEdge2Shape(cell, graph, xmlDoc, parentHeight, parentGeo)
+ {
+ var state = graph.view.getState(cell);
+
+ var shape = xmlDoc.createElement("Shape");
+ shape.setAttribute("ID", cell.id);
+ shape.setAttribute("NameU", "Edge" + cell.id);
+ shape.setAttribute("LineStyle", "0");
+ shape.setAttribute("FillStyle", "0");
+ shape.setAttribute("TextStyle", "0");
+
+ var points = state.absolutePoints;
+ var bounds = state.cellBounds;
+
+ var hw = bounds.width/2, hh = bounds.height/2;
+
+ shape.appendChild(createCellElemScaled("PinX", bounds.x + hw, xmlDoc));
+ shape.appendChild(createCellElemScaled("PinY", parentHeight - bounds.y - hh, xmlDoc));
+ shape.appendChild(createCellElemScaled("Width", bounds.width, xmlDoc));
+ shape.appendChild(createCellElemScaled("Height", bounds.height, xmlDoc));
+ shape.appendChild(createCellElemScaled("LocPinX", hw, xmlDoc));
+ shape.appendChild(createCellElemScaled("LocPinY", hh, xmlDoc));
+
+ var s = vsdxCanvas.state;
+
+ var calcVsdxPoint = function(p, noHeight)
+ {
+ var x = p.x, y = p.y;
+ x = (x - bounds.x + s.dx) * s.scale;
+ y = ((noHeight? 0 : bounds.height) - y + bounds.y - s.dy) * s.scale;
+ return {x: x, y: y};
+ };
+
+ var p0 = calcVsdxPoint(points[0], true);
+
+ shape.appendChild(createCellElemScaled("BeginX", bounds.x + p0.x, xmlDoc));
+ shape.appendChild(createCellElemScaled("BeginY", parentHeight - bounds.y + p0.y, xmlDoc));
+
+ var pe = calcVsdxPoint(points[points.length - 1], true);
+
+ shape.appendChild(createCellElemScaled("EndX", bounds.x + pe.x, xmlDoc));
+ shape.appendChild(createCellElemScaled("EndY", parentHeight - bounds.y + pe.y, xmlDoc));
+
+ shape.appendChild(createCellElem("BegTrigger", "2", xmlDoc));
+ shape.appendChild(createCellElem("EndTrigger", "2", xmlDoc));
+ shape.appendChild(createCellElem("ConFixedCode", "6", xmlDoc));
+ shape.appendChild(createCellElem("LockHeight", "1", xmlDoc));
+ shape.appendChild(createCellElem("LockCalcWH", "1", xmlDoc));
+ shape.appendChild(createCellElem("NoAlignBox", "1", xmlDoc));
+ shape.appendChild(createCellElem("DynFeedback", "2", xmlDoc));
+ shape.appendChild(createCellElem("GlueType", "2", xmlDoc));
+ shape.appendChild(createCellElem("ObjType", "2", xmlDoc));
+ shape.appendChild(createCellElem("NoLiveDynamics", "1", xmlDoc));
+ shape.appendChild(createCellElem("ShapeSplittable", "1", xmlDoc));
+ shape.appendChild(createCellElem("LayerMember", "0", xmlDoc));
+
+ applyMxCellStyle(state, shape, xmlDoc);
+
+ //Edge special styles
+ var startFill = state.style[mxConstants.STYLE_STARTFILL];
+ var startArrow = state.style[mxConstants.STYLE_STARTARROW];
+ var startSize = state.style[mxConstants.STYLE_STARTSIZE];
+
+ var type = getArrowType(startArrow, startFill);
+ shape.appendChild(createCellElem("BeginArrow", type, xmlDoc));
+ shape.appendChild(createCellElem("BeginArrowSize", getArrowSize(startSize), xmlDoc));
+
+ var endFill = state.style[mxConstants.STYLE_ENDFILL];
+ var endArrow = state.style[mxConstants.STYLE_ENDARROW];
+ var endSize = state.style[mxConstants.STYLE_ENDSIZE];
+
+ var type = getArrowType(endArrow, endFill);
+ shape.appendChild(createCellElem("EndArrow", type, xmlDoc));
+ shape.appendChild(createCellElem("EndArrowSize", getArrowSize(endSize), xmlDoc));
+
+ var geoSec = xmlDoc.createElement("Section");
+
+ geoSec.setAttribute("N", "Geometry");
+ geoSec.setAttribute("IX", "0");
+
+ for (var i = 0; i < points.length; i++)
+ {
+ var p = calcVsdxPoint(points[i]);
+ geoSec.appendChild(createRow(i==0 ? "MoveTo" : "LineTo", (i + 1), p.x, p.y, xmlDoc));
+ }
+
+ geoSec.appendChild(createCellElem("NoFill", "1", xmlDoc));
+ geoSec.appendChild(createCellElem("NoLine", "0", xmlDoc));
+ shape.appendChild(geoSec);
+
+ return shape;
+ };
function convertMxCell2Shape(cell, graph, xmlDoc, parentHeight, parentGeo)
{
@@ -301,6 +426,7 @@ function VsdxExport(editorUi, resDir)
if (geo != null)
{
+ //fix relative geo coordinates
if (geo.relative && parentGeo)
{
geo = geo.clone();
@@ -308,49 +434,90 @@ function VsdxExport(editorUi, resDir)
geo.y *= parentGeo.height;
geo.relative = 0;
}
-
- var shape = createShape(cell.id, geo, xmlDoc, parentHeight);
-
- var state = graph.view.getState(cell);
-
- applyMxCellStyle(state, shape, xmlDoc);
- vsdxCanvas.newShape(shape, geo, xmlDoc);
-
- if (state.text != null && state.text.checkBounds())
+ if (!cell.treatAsSingle && cell.getChildCount() > 0) //Group
{
+ //Create group shape as an empty shape with no geo
+ var shape = createShape(cell.id+"10000", geo, xmlDoc, parentHeight);
+ shape.setAttribute("Type", "Group");
+
+ //Create group shape
+ var gShapes = xmlDoc.createElement("Shapes");
+
+ //translate the canvas using the group coordinates
vsdxCanvas.save();
+ vsdxCanvas.translate(-geo.x, -geo.y);
+
+ //Draw the actual group shape as a child (so change its geo coord to 0,0).
+ // In mxGraph group shape can have styles and stencil
+ var newGeo = geo.clone();
+ newGeo.x = 0;
+ newGeo.y = 0;
+ cell.setGeometry(newGeo);
+ cell.treatAsSingle = true;
+ var subShape = convertMxCell2Shape(cell, graph, xmlDoc, geo.height, geo);
+ cell.treatAsSingle = false;
+ cell.setGeometry(geo);
+ gShapes.appendChild(subShape);
- if (parentGeo)
+ //add group children
+ for (var i = 0; i < cell.children.length; i++)
{
- vsdxCanvas.translate(-parentGeo.x, -parentGeo.y);
+ var child = cell.children[i];
+ var subShape;
+
+ if (child.vertex)
+ subShape = convertMxCell2Shape(child, graph, xmlDoc, geo.height, geo);
+ else
+ subShape = convertMxEdge2Shape(child, graph, xmlDoc, geo.height, geo);
+
+ gShapes.appendChild(subShape);
}
- state.text.paint(vsdxCanvas);
+ shape.appendChild(gShapes);
+
+ //restore the canvas to before group translation
vsdxCanvas.restore();
+
+ return shape;
}
- if (state.shape != null && state.shape.checkBounds())
+ else
{
- vsdxCanvas.save();
+
+ var shape = createShape(cell.id, geo, xmlDoc, parentHeight);
- if (parentGeo)
+ var state = graph.view.getState(cell);
+
+ applyMxCellStyle(state, shape, xmlDoc);
+
+ vsdxCanvas.newShape(shape, state, xmlDoc);
+
+ //Draw text first to have its shape cell elements before visio geo.
+ if (state.text != null && state.text.checkBounds())
{
- vsdxCanvas.translate(-parentGeo.x, -parentGeo.y);
+ vsdxCanvas.save();
+ state.text.paint(vsdxCanvas);
+ vsdxCanvas.restore();
+ }
+ if (state.shape != null && state.shape.checkBounds())
+ {
+ vsdxCanvas.save();
+ state.shape.paint(vsdxCanvas);
+ vsdxCanvas.restore();
}
-
- state.shape.paint(vsdxCanvas);
- vsdxCanvas.restore();
- }
- shape.appendChild(vsdxCanvas.getShapeGeo());
+ shape.appendChild(vsdxCanvas.getShapeGeo());
- vsdxCanvas.endShape();
- shape.setAttribute("Type", vsdxCanvas.getShapeType());
+ vsdxCanvas.endShape();
+ shape.setAttribute("Type", vsdxCanvas.getShapeType());
- return shape;
+ return shape;
+ }
+ }
+ else
+ {
+ return null;
}
-
- return null;
};
@@ -379,45 +546,52 @@ function VsdxExport(editorUi, resDir)
for (var id in model.cells)
{
- var c = model.cells[id];
+ var cell = model.cells[id];
//top-most cells
- if (c.parent == defParent)
+ if (cell.parent == defParent)
{
var shape;
- if (c.getChildCount() > 0) //Group
- {
- var geo = c.geometry;
- shape = createShape(c.id+"10000", geo, xmlDoc, modelAttrib.pageHeight);
- shape.setAttribute("Type", "Group");
-
- var gShapes = xmlDoc.createElement("Shapes");
-
- var newGeo = geo.clone();
- newGeo.x = 0;
- newGeo.y = 0;
- c.setGeometry(newGeo);
- var subShape = convertMxCell2Shape(c, graph, xmlDoc, geo.height, geo);
- c.setGeometry(geo);
- gShapes.appendChild(subShape);
-
- for (var i = 0; i < c.children.length; i++)
- {
- var subShape = convertMxCell2Shape(c.children[i], graph, xmlDoc, geo.height, geo);
- gShapes.appendChild(subShape);
- }
-
- shape.appendChild(gShapes);
- }
+
+ if (cell.vertex)
+ shape = convertMxCell2Shape(cell, graph, xmlDoc, modelAttrib.pageHeight);
else
- {
- shape = convertMxCell2Shape(c, graph, xmlDoc, modelAttrib.pageHeight);
- }
+ shape = convertMxEdge2Shape(cell, graph, xmlDoc, modelAttrib.pageHeight);
if (shape != null)
shapes.appendChild(shape);
}
}
+ var connects = xmlDoc.createElement("Connects");
+ root.appendChild(connects);
+
+ //Second pass to add edges (connections)
+ for (var id in model.cells)
+ {
+ var cell = model.cells[id];
+
+ if (cell.edge)
+ {
+ if (cell.source)
+ {
+ var connect = xmlDoc.createElement("Connect");
+ connect.setAttribute("FromSheet", cell.id);
+ connect.setAttribute("FromCell", "BeginX");
+ connect.setAttribute("ToSheet", cell.source.id);
+ connects.appendChild(connect);
+ }
+
+ if (cell.target)
+ {
+ var connect = xmlDoc.createElement("Connect");
+ connect.setAttribute("FromSheet", cell.id);
+ connect.setAttribute("FromCell", "EndX");
+ connect.setAttribute("ToSheet", cell.target.id);
+ connects.appendChild(connect);
+ }
+ }
+ }
+
xmlDoc.appendChild(root);
return xmlDoc;
@@ -608,3 +782,9 @@ VsdxExport.prototype.VSDX_ENC = "ISO-8859-1";
VsdxExport.prototype.PART_NAME = "PartName";
VsdxExport.prototype.CONTENT_TYPES_XML = "[Content_Types].xml";
VsdxExport.prototype.VISIO_PAGES_RELS = "visio/pages/_rels/";
+VsdxExport.prototype.ARROWS_MAP = {
+ "none|1": 0, "none|0": 0, "open|1": 1, "open|0": 1, "block|1": 4, "block|1": 14, "classic|1": 5, "classic|0": 17,
+ "oval|1": 10, "oval|0": 20, "diamond|1": 11, "diamond|0": 22, "blockThin|1": 2, "blockThin|0": 2, "dash|1": 23, "dash|0": 23,
+ "ERone|1": 24, "ERone|0": 24, "ERmandOne|1": 25, "ERmandOne|0": 25, "ERmany|1": 27, "ERmany|0": 27, "ERoneToMany|1": 28, "ERoneToMany|0": 28,
+ "ERzeroToMany|1": 29, "ERzeroToMany|0": 29, "ERzeroToOne|1": 30, "ERzeroToOne|1": 30, "openAsync|1": 9, "openAsync|0": 9
+};
diff --git a/war/js/diagramly/vsdx/mxVsdxCanvas2D.js b/war/js/diagramly/vsdx/mxVsdxCanvas2D.js
index 6e97552a..530e1bb8 100644
--- a/war/js/diagramly/vsdx/mxVsdxCanvas2D.js
+++ b/war/js/diagramly/vsdx/mxVsdxCanvas2D.js
@@ -68,11 +68,12 @@ mxVsdxCanvas2D.prototype.createGeoSec = function ()
*
* Create a new shape.
*/
-mxVsdxCanvas2D.prototype.newShape = function (shape, xmGeo, xmlDoc)
+mxVsdxCanvas2D.prototype.newShape = function (shape, cellState, xmlDoc)
{
this.geoIndex = 0;
this.shape = shape;
- this.xmGeo = xmGeo;
+ this.cellState = cellState;
+ this.xmGeo = cellState.cell.geometry;
this.xmlDoc = xmlDoc;
this.geoSec = null;
this.shapeImg = null;
@@ -557,6 +558,23 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
}
//TODO support HTML text formatting and remaining attributes
+ if (this.cellState.style['html'] == '1')
+ {
+ if (mxUtils.getValue(this.cellState.style, 'nl2Br', '1') != '0')
+ {
+ // Removes newlines from HTML and converts breaks to newlines
+ // to match the HTML output in plain text
+ str = str.replace(/\n/g, '').replace(/<br\s*.?>/g, '\n');
+ }
+
+ // Removes HTML tags
+ if (this.html2txtDiv == null)
+ this.html2txtDiv = document.createElement('div');
+
+ this.html2txtDiv.innerHTML = str;
+ str = mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes);
+ }
+
var s = this.state;
var geo = this.xmGeo;
diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js
index 29f99494..862cecfb 100644
--- a/war/js/embed-static.min.js
+++ b/war/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
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");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,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:"6.6.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:"6.6.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/")||
diff --git a/war/js/mxgraph/Dialogs.js b/war/js/mxgraph/Dialogs.js
index bafeb2d5..d28a6ae7 100644
--- a/war/js/mxgraph/Dialogs.js
+++ b/war/js/mxgraph/Dialogs.js
@@ -2,168 +2,6 @@
* Copyright (c) 2006-2012, JGraph Ltd
*/
/**
- * Constructs a new dialog.
- */
-function Dialog(editorUi, elt, w, h, modal, closable, onClose)
-{
- var dx = 0;
-
- if (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8))
- {
- // Adds padding as a workaround for box model in older IE versions
- // This needs to match the total padding of geDialog in CSS
- dx = 80;
- }
-
- w += dx;
- h += dx;
-
- var dh = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
-
- var left = Math.max(1, Math.round((document.body.scrollWidth - w - 64) / 2));
- var top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));
-
- // Keeps window size inside available space
- if (!mxClient.IS_QUIRKS)
- {
- elt.style.maxHeight = '100%';
- }
-
- w = Math.min(w, document.body.scrollWidth - 64);
- h = Math.min(h, dh - 64);
-
- // Increments zIndex to put subdialogs and background over existing dialogs and background
- if (editorUi.dialogs.length > 0)
- {
- this.zIndex += editorUi.dialogs.length * 2;
- }
-
- var div = editorUi.createDiv('geDialog');
- div.style.width = w + 'px';
- div.style.height = h + 'px';
- div.style.left = left + 'px';
- div.style.top = top + 'px';
- div.style.zIndex = this.zIndex;
-
- if (this.bg == null)
- {
- this.bg = editorUi.createDiv('background');
- this.bg.style.position = 'absolute';
- this.bg.style.background = 'white';
- this.bg.style.left = '0px';
- this.bg.style.top = '0px';
- this.bg.style.bottom = '0px';
- this.bg.style.right = '0px';
- this.bg.style.zIndex = this.zIndex - 2;
-
- mxUtils.setOpacity(this.bg, this.bgOpacity);
-
- if (mxClient.IS_QUIRKS)
- {
- new mxDivResizer(this.bg);
- }
- }
-
- if (modal)
- {
- document.body.appendChild(this.bg);
- }
-
- div.appendChild(elt);
- document.body.appendChild(div);
-
- if (closable)
- {
- var img = document.createElement('img');
-
- img.setAttribute('src', Dialog.prototype.closeImage);
- img.setAttribute('title', mxResources.get('close'));
- img.className = 'geDialogClose';
- img.style.top = (top + 14) + 'px';
- img.style.left = (left + w + 38 - dx) + 'px';
- img.style.zIndex = this.zIndex;
-
- mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
- {
- editorUi.hideDialog(true);
- }));
-
- document.body.appendChild(img);
- this.dialogImg = img;
-
- mxEvent.addGestureListeners(this.bg, null, null, mxUtils.bind(this, function(evt)
- {
- editorUi.hideDialog(true);
- }));
- }
-
- this.onDialogClose = onClose;
- this.container = div;
-
- editorUi.editor.fireEvent(new mxEventObject('showDialog'));
-};
-
-/**
- *
- */
-Dialog.prototype.zIndex = mxPopupMenu.prototype.zIndex - 1;
-
-/**
- *
- */
-Dialog.prototype.noColorImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/nocolor.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC';
-
-/**
- *
- */
-Dialog.prototype.closeImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/close.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==';
-
-/**
- *
- */
-Dialog.prototype.clearImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/clear.gif' : 'data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==';
-
-/**
- *
- */
-Dialog.prototype.lockedImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/locked.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC';
-
-/**
- *
- */
-Dialog.prototype.unlockedImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/unlocked.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==';
-
-/**
- * Removes the dialog from the DOM.
- */
-Dialog.prototype.bgOpacity = 80;
-
-/**
- * Removes the dialog from the DOM.
- */
-Dialog.prototype.close = function(cancel)
-{
- if (this.onDialogClose != null)
- {
- this.onDialogClose(cancel);
- this.onDialogClose = null;
- }
-
- if (this.dialogImg != null)
- {
- this.dialogImg.parentNode.removeChild(this.dialogImg);
- this.dialogImg = null;
- }
-
- if (this.bg != null && this.bg.parentNode != null)
- {
- this.bg.parentNode.removeChild(this.bg);
- }
-
- this.container.parentNode.removeChild(this.container);
-};
-
-/**
* Constructs a new open dialog.
*/
var OpenDialog = function()
@@ -525,742 +363,6 @@ var AboutDialog = function(editorUi)
};
/**
- * Constructs a new page setup dialog.
- */
-var PageSetupDialog = function(editorUi)
-{
- var graph = editorUi.editor.graph;
- var row, td;
-
- var table = document.createElement('table');
- table.style.width = '100%';
- table.style.height = '100%';
- var tbody = document.createElement('tbody');
-
- row = document.createElement('tr');
-
- td = document.createElement('td');
- td.style.verticalAlign = 'top';
- td.style.fontSize = '10pt';
- mxUtils.write(td, mxResources.get('paperSize') + ':');
-
- row.appendChild(td);
-
- td = document.createElement('td');
- td.style.verticalAlign = 'top';
- td.style.fontSize = '10pt';
-
- var accessor = PageSetupDialog.addPageFormatPanel(td, 'pagesetupdialog', graph.pageFormat);
-
- row.appendChild(td);
- tbody.appendChild(row);
-
- row = document.createElement('tr');
-
- td = document.createElement('td');
- mxUtils.write(td, mxResources.get('background') + ':');
-
- row.appendChild(td);
-
- td = document.createElement('td');
- td.style.whiteSpace = 'nowrap';
-
- var backgroundInput = document.createElement('input');
- backgroundInput.setAttribute('type', 'text');
- var backgroundButton = document.createElement('button');
-
- backgroundButton.style.width = '18px';
- backgroundButton.style.height = '18px';
- backgroundButton.style.marginRight = '20px';
- backgroundButton.style.backgroundPosition = 'center center';
- backgroundButton.style.backgroundRepeat = 'no-repeat';
-
- var newBackgroundColor = graph.background;
-
- function updateBackgroundColor()
- {
- if (newBackgroundColor == null || newBackgroundColor == mxConstants.NONE)
- {
- backgroundButton.style.backgroundColor = '';
- backgroundButton.style.backgroundImage = 'url(\'' + Dialog.prototype.noColorImage + '\')';
- }
- else
- {
- backgroundButton.style.backgroundColor = newBackgroundColor;
- backgroundButton.style.backgroundImage = '';
- }
- };
-
- updateBackgroundColor();
-
- mxEvent.addListener(backgroundButton, 'click', function(evt)
- {
- editorUi.pickColor(newBackgroundColor || 'none', function(color)
- {
- newBackgroundColor = color;
- updateBackgroundColor();
- });
- mxEvent.consume(evt);
- });
-
- td.appendChild(backgroundButton);
-
- mxUtils.write(td, mxResources.get('gridSize') + ':');
-
- var gridSizeInput = document.createElement('input');
- gridSizeInput.setAttribute('type', 'number');
- gridSizeInput.setAttribute('min', '0');
- gridSizeInput.style.width = '40px';
- gridSizeInput.style.marginLeft = '6px';
-
- gridSizeInput.value = graph.getGridSize();
- td.appendChild(gridSizeInput);
-
- mxEvent.addListener(gridSizeInput, 'change', function()
- {
- var value = parseInt(gridSizeInput.value);
- gridSizeInput.value = Math.max(1, (isNaN(value)) ? graph.getGridSize() : value);
- });
-
- row.appendChild(td);
- tbody.appendChild(row);
-
- row = document.createElement('tr');
- td = document.createElement('td');
-
- mxUtils.write(td, mxResources.get('image') + ':');
-
- row.appendChild(td);
- td = document.createElement('td');
-
- var changeImageLink = document.createElement('a');
- changeImageLink.style.textDecoration = 'underline';
- changeImageLink.style.cursor = 'pointer';
- changeImageLink.style.color = '#a0a0a0';
-
- var newBackgroundImage = graph.backgroundImage;
-
- function updateBackgroundImage()
- {
- if (newBackgroundImage == null)
- {
- changeImageLink.removeAttribute('title');
- changeImageLink.style.fontSize = '';
- changeImageLink.innerHTML = mxResources.get('change') + '...';
- }
- else
- {
- changeImageLink.setAttribute('title', newBackgroundImage.src);
- changeImageLink.style.fontSize = '11px';
- changeImageLink.innerHTML = newBackgroundImage.src.substring(0, 42) + '...';
- }
- };
-
- mxEvent.addListener(changeImageLink, 'click', function(evt)
- {
- editorUi.showBackgroundImageDialog(function(image)
- {
- newBackgroundImage = image;
- updateBackgroundImage();
- });
-
- mxEvent.consume(evt);
- });
-
- updateBackgroundImage();
-
- td.appendChild(changeImageLink);
-
- row.appendChild(td);
- tbody.appendChild(row);
-
- row = document.createElement('tr');
- td = document.createElement('td');
- td.colSpan = 2;
- td.style.paddingTop = '16px';
- td.setAttribute('align', 'right');
-
- var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
- {
- editorUi.hideDialog();
- });
- cancelBtn.className = 'geBtn';
-
- if (editorUi.editor.cancelFirst)
- {
- td.appendChild(cancelBtn);
- }
-
- var applyBtn = mxUtils.button(mxResources.get('apply'), function()
- {
- editorUi.hideDialog();
- editorUi.setPageFormat(accessor.get());
-
- if (graph.background != newBackgroundColor)
- {
- editorUi.setBackgroundColor(newBackgroundColor);
- }
-
- if (graph.backgroundImage !== newBackgroundImage)
- {
- editorUi.setBackgroundImage(newBackgroundImage);
- }
-
- if (graph.gridSize !== gridSizeInput.value)
- {
- graph.setGridSize(parseInt(gridSizeInput.value));
- }
- });
- applyBtn.className = 'geBtn gePrimaryBtn';
- td.appendChild(applyBtn);
-
- if (!editorUi.editor.cancelFirst)
- {
- td.appendChild(cancelBtn);
- }
-
- row.appendChild(td);
- tbody.appendChild(row);
-
- table.appendChild(tbody);
- this.container = table;
-};
-
-/**
- *
- */
-PageSetupDialog.addPageFormatPanel = function(div, namePostfix, pageFormat, pageFormatListener)
-{
- var formatName = 'format-' + namePostfix;
-
- var portraitCheckBox = document.createElement('input');
- portraitCheckBox.setAttribute('name', formatName);
- portraitCheckBox.setAttribute('type', 'radio');
- portraitCheckBox.setAttribute('value', 'portrait');
-
- var landscapeCheckBox = document.createElement('input');
- landscapeCheckBox.setAttribute('name', formatName);
- landscapeCheckBox.setAttribute('type', 'radio');
- landscapeCheckBox.setAttribute('value', 'landscape');
-
- var paperSizeSelect = document.createElement('select');
- paperSizeSelect.style.marginBottom = '8px';
- paperSizeSelect.style.width = '202px';
-
- var formatDiv = document.createElement('div');
- formatDiv.style.marginLeft = '4px';
- formatDiv.style.width = '210px';
- formatDiv.style.height = '24px';
-
- portraitCheckBox.style.marginRight = '6px';
- formatDiv.appendChild(portraitCheckBox);
-
- var portraitSpan = document.createElement('span');
- portraitSpan.style.maxWidth = '100px';
- mxUtils.write(portraitSpan, mxResources.get('portrait'));
- formatDiv.appendChild(portraitSpan);
-
- landscapeCheckBox.style.marginLeft = '10px';
- landscapeCheckBox.style.marginRight = '6px';
- formatDiv.appendChild(landscapeCheckBox);
-
- var landscapeSpan = document.createElement('span');
- landscapeSpan.style.width = '100px';
- mxUtils.write(landscapeSpan, mxResources.get('landscape'));
- formatDiv.appendChild(landscapeSpan)
-
- var customDiv = document.createElement('div');
- customDiv.style.marginLeft = '4px';
- customDiv.style.width = '210px';
- customDiv.style.height = '24px';
-
- var widthInput = document.createElement('input');
- widthInput.setAttribute('size', '6');
- widthInput.setAttribute('value', pageFormat.width);
- customDiv.appendChild(widthInput);
- mxUtils.write(customDiv, ' x ');
-
- var heightInput = document.createElement('input');
- heightInput.setAttribute('size', '6');
- heightInput.setAttribute('value', pageFormat.height);
- customDiv.appendChild(heightInput);
- mxUtils.write(customDiv, ' pt');
-
- formatDiv.style.display = 'none';
- customDiv.style.display = 'none';
-
- var pf = new Object();
- var formats = PageSetupDialog.getFormats();
-
- for (var i = 0; i < formats.length; i++)
- {
- var f = formats[i];
- pf[f.key] = f;
-
- var paperSizeOption = document.createElement('option');
- paperSizeOption.setAttribute('value', f.key);
- mxUtils.write(paperSizeOption, f.title);
- paperSizeSelect.appendChild(paperSizeOption);
- }
-
- var customSize = false;
-
- function listener(sender, evt, force)
- {
- if (force || (widthInput != document.activeElement && heightInput != document.activeElement))
- {
- var detected = false;
-
- for (var i = 0; i < formats.length; i++)
- {
- var f = formats[i];
-
- // Special case where custom was chosen
- if (customSize)
- {
- if (f.key == 'custom')
- {
- paperSizeSelect.value = f.key;
- customSize = false;
- }
- }
- else if (f.format != null)
- {
- if (pageFormat.width == f.format.width && pageFormat.height == f.format.height)
- {
- paperSizeSelect.value = f.key;
- portraitCheckBox.setAttribute('checked', 'checked');
- portraitCheckBox.defaultChecked = true;
- portraitCheckBox.checked = true;
- landscapeCheckBox.removeAttribute('checked');
- landscapeCheckBox.defaultChecked = false;
- landscapeCheckBox.checked = false;
- detected = true;
- }
- else if (pageFormat.width == f.format.height && pageFormat.height == f.format.width)
- {
- paperSizeSelect.value = f.key;
- portraitCheckBox.removeAttribute('checked');
- portraitCheckBox.defaultChecked = false;
- portraitCheckBox.checked = false;
- landscapeCheckBox.setAttribute('checked', 'checked');
- landscapeCheckBox.defaultChecked = true;
- landscapeCheckBox.checked = true;
- detected = true;
- }
- }
- }
-
- // Selects custom format which is last in list
- if (!detected)
- {
- widthInput.value = pageFormat.width;
- heightInput.value = pageFormat.height;
- paperSizeOption.setAttribute('selected', 'selected');
- portraitCheckBox.setAttribute('checked', 'checked');
- portraitCheckBox.defaultChecked = true;
- formatDiv.style.display = 'none';
- customDiv.style.display = '';
- }
- else
- {
- formatDiv.style.display = '';
- customDiv.style.display = 'none';
- }
- }
- };
- listener();
-
- div.appendChild(paperSizeSelect);
- mxUtils.br(div);
-
- div.appendChild(formatDiv);
- div.appendChild(customDiv);
-
- var currentPageFormat = pageFormat;
-
- var update = function()
- {
- var f = pf[paperSizeSelect.value];
-
- if (f.format != null)
- {
- widthInput.value = f.format.width;
- heightInput.value = f.format.height;
- customDiv.style.display = 'none';
- formatDiv.style.display = '';
- }
- else
- {
- formatDiv.style.display = 'none';
- customDiv.style.display = '';
- }
-
- var newPageFormat = new mxRectangle(0, 0, parseInt(widthInput.value), parseInt(heightInput.value));
-
- if (paperSizeSelect.value != 'custom' && landscapeCheckBox.checked)
- {
- newPageFormat = new mxRectangle(0, 0, newPageFormat.height, newPageFormat.width);
- }
-
- if (newPageFormat.width != currentPageFormat.width || newPageFormat.height != currentPageFormat.height)
- {
- currentPageFormat = newPageFormat;
-
- if (pageFormatListener != null)
- {
- pageFormatListener(currentPageFormat);
- }
- }
- };
-
- mxEvent.addListener(portraitSpan, 'click', function(evt)
- {
- portraitCheckBox.checked = true;
- update();
- mxEvent.consume(evt);
- });
-
- mxEvent.addListener(landscapeSpan, 'click', function(evt)
- {
- landscapeCheckBox.checked = true;
- update();
- mxEvent.consume(evt);
- });
-
- mxEvent.addListener(widthInput, 'blur', update);
- mxEvent.addListener(widthInput, 'click', update);
- mxEvent.addListener(heightInput, 'blur', update);
- mxEvent.addListener(heightInput, 'click', update);
- mxEvent.addListener(landscapeCheckBox, 'change', update);
- mxEvent.addListener(portraitCheckBox, 'change', update);
- mxEvent.addListener(paperSizeSelect, 'change', function()
- {
- // Handles special case where custom was chosen
- customSize = paperSizeSelect.value == 'custom';
- update();
- });
-
- update();
-
- return {set: function(value)
- {
- pageFormat = value;
- listener(null, null, true);
- },get: function()
- {
- return currentPageFormat;
- }, widthInput: widthInput,
- heightInput: heightInput};
-};
-
-/**
- *
- */
-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: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1652)},
- {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, 584, 826)},
- {key: 'custom', title: mxResources.get('custom'), format: null}];
-};
-
-/**
- * Constructs a new print dialog.
- */
-var PrintDialog = function(editorUi, title)
-{
- this.create(editorUi, title);
-};
-
-/**
- * Constructs a new print dialog.
- */
-PrintDialog.prototype.create = function(editorUi)
-{
- var graph = editorUi.editor.graph;
- var row, td;
-
- var table = document.createElement('table');
- table.style.width = '100%';
- table.style.height = '100%';
- var tbody = document.createElement('tbody');
-
- row = document.createElement('tr');
-
- var onePageCheckBox = document.createElement('input');
- onePageCheckBox.setAttribute('type', 'checkbox');
- td = document.createElement('td');
- td.setAttribute('colspan', '2');
- td.style.fontSize = '10pt';
- td.appendChild(onePageCheckBox);
-
- var span = document.createElement('span');
- mxUtils.write(span, ' ' + mxResources.get('fitPage'));
- td.appendChild(span);
-
- mxEvent.addListener(span, 'click', function(evt)
- {
- onePageCheckBox.checked = !onePageCheckBox.checked;
- pageCountCheckBox.checked = !onePageCheckBox.checked;
- mxEvent.consume(evt);
- });
-
- mxEvent.addListener(onePageCheckBox, 'change', function()
- {
- pageCountCheckBox.checked = !onePageCheckBox.checked;
- });
-
- row.appendChild(td);
- tbody.appendChild(row);
-
- row = row.cloneNode(false);
-
- var pageCountCheckBox = document.createElement('input');
- pageCountCheckBox.setAttribute('type', 'checkbox');
- td = document.createElement('td');
- td.style.fontSize = '10pt';
- td.appendChild(pageCountCheckBox);
-
- var span = document.createElement('span');
- mxUtils.write(span, ' ' + mxResources.get('posterPrint') + ':');
- td.appendChild(span);
-
- mxEvent.addListener(span, 'click', function(evt)
- {
- pageCountCheckBox.checked = !pageCountCheckBox.checked;
- onePageCheckBox.checked = !pageCountCheckBox.checked;
- mxEvent.consume(evt);
- });
-
- row.appendChild(td);
-
- var pageCountInput = document.createElement('input');
- pageCountInput.setAttribute('value', '1');
- pageCountInput.setAttribute('type', 'number');
- pageCountInput.setAttribute('min', '1');
- pageCountInput.setAttribute('size', '4');
- pageCountInput.setAttribute('disabled', 'disabled');
- pageCountInput.style.width = '50px';
-
- td = document.createElement('td');
- td.style.fontSize = '10pt';
- td.appendChild(pageCountInput);
- mxUtils.write(td, ' ' + mxResources.get('pages') + ' (max)');
- row.appendChild(td);
- tbody.appendChild(row);
-
- mxEvent.addListener(pageCountCheckBox, 'change', function()
- {
- if (pageCountCheckBox.checked)
- {
- pageCountInput.removeAttribute('disabled');
- }
- else
- {
- pageCountInput.setAttribute('disabled', 'disabled');
- }
-
- onePageCheckBox.checked = !pageCountCheckBox.checked;
- });
-
- row = row.cloneNode(false);
-
- td = document.createElement('td');
- mxUtils.write(td, mxResources.get('pageScale') + ':');
- row.appendChild(td);
-
- td = document.createElement('td');
- var pageScaleInput = document.createElement('input');
- pageScaleInput.setAttribute('value', '100 %');
- pageScaleInput.setAttribute('size', '5');
- pageScaleInput.style.width = '50px';
-
- td.appendChild(pageScaleInput);
- row.appendChild(td);
- tbody.appendChild(row);
-
- row = document.createElement('tr');
- td = document.createElement('td');
- td.colSpan = 2;
- td.style.paddingTop = '20px';
- td.setAttribute('align', 'right');
-
- // Overall scale for print-out to account for print borders in dialogs etc
- function preview(print)
- {
- var autoOrigin = onePageCheckBox.checked || pageCountCheckBox.checked;
- var printScale = parseInt(pageScaleInput.value) / 100;
-
- if (isNaN(printScale))
- {
- printScale = 1;
- pageScaleInput.value = '100%';
- }
-
- // Workaround to match available paper size in actual print output
- printScale *= 0.75;
-
- var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;
- var scale = 1 / graph.pageScale;
-
- if (autoOrigin)
- {
- var pageCount = (onePageCheckBox.checked) ? 1 : parseInt(pageCountInput.value);
-
- if (!isNaN(pageCount))
- {
- scale = mxUtils.getScaleForPageCount(pageCount, graph, pf);
- }
- }
-
- // Negative coordinates are cropped or shifted if page visible
- var gb = graph.getGraphBounds();
- var border = 0;
- var x0 = 0;
- var y0 = 0;
-
- // Applies print scale
- pf = mxRectangle.fromRectangle(pf);
- pf.width = Math.ceil(pf.width * printScale);
- pf.height = Math.ceil(pf.height * printScale);
- scale *= printScale;
-
- // Starts at first visible page
- if (!autoOrigin && graph.pageVisible)
- {
- var layout = graph.getPageLayout();
- x0 -= layout.x * pf.width;
- y0 -= layout.y * pf.height;
- }
- else
- {
- autoOrigin = true;
- }
-
- var preview = PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin);
- preview.open();
-
- if (print)
- {
- PrintDialog.printPreview(preview);
- }
- };
-
- var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
- {
- editorUi.hideDialog();
- });
- cancelBtn.className = 'geBtn';
-
- if (editorUi.editor.cancelFirst)
- {
- td.appendChild(cancelBtn);
- }
-
- if (PrintDialog.previewEnabled)
- {
- var previewBtn = mxUtils.button(mxResources.get('preview'), function()
- {
- editorUi.hideDialog();
- preview(false);
- });
- previewBtn.className = 'geBtn';
- td.appendChild(previewBtn);
- }
-
- var printBtn = mxUtils.button(mxResources.get((!PrintDialog.previewEnabled) ? 'ok' : 'print'), function()
- {
- editorUi.hideDialog();
- preview(true);
- });
- printBtn.className = 'geBtn gePrimaryBtn';
- td.appendChild(printBtn);
-
- if (!editorUi.editor.cancelFirst)
- {
- td.appendChild(cancelBtn);
- }
-
- row.appendChild(td);
- tbody.appendChild(row);
-
- table.appendChild(tbody);
- this.container = table;
-};
-
-/**
- * Constructs a new print dialog.
- */
-PrintDialog.printPreview = function(preview)
-{
- if (preview.wnd != null)
- {
- var printFn = function()
- {
- preview.wnd.focus();
- preview.wnd.print();
- preview.wnd.close();
- };
-
- // Workaround for Google Chrome which needs a bit of a
- // delay in order to render the SVG contents
- // Needs testing in production
- if (mxClient.IS_GC)
- {
- window.setTimeout(printFn, 500);
- }
- else
- {
- printFn();
- }
- }
-};
-
-/**
- * Constructs a new print dialog.
- */
-PrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin)
-{
- var preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);
- preview.title = mxResources.get('preview');
- preview.printBackgroundImage = true;
- preview.autoOrigin = autoOrigin;
- var bg = graph.background;
-
- if (bg == null || bg == '' || bg == mxConstants.NONE)
- {
- bg = '#ffffff';
- }
-
- preview.backgroundColor = bg;
-
- var writeHead = preview.writeHead;
-
- // Adds a border in the preview
- preview.writeHead = function(doc)
- {
- writeHead.apply(this, arguments);
-
- doc.writeln('<style type="text/css">');
- doc.writeln('@media screen {');
- doc.writeln(' body > div { padding:30px;box-sizing:content-box; }');
- doc.writeln('}');
- doc.writeln('</style>');
- };
-
- return preview;
-};
-
-/**
- * Specifies if the preview button should be enabled. Default is true.
- */
-PrintDialog.previewEnabled = true;
-
-/**
* Constructs a new filename dialog.
*/
var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validateFn, content, helpLink, closeOnBtn, cancelFn)
diff --git a/war/js/mxgraph/Editor.js b/war/js/mxgraph/Editor.js
index d70a1a01..6fc04f52 100644
--- a/war/js/mxgraph/Editor.js
+++ b/war/js/mxgraph/Editor.js
@@ -161,6 +161,11 @@ Editor.actualSizeLargeImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACA
/**
* Specifies the image URL to be used for the transparent background.
*/
+Editor.printLargeImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAXVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9RKvvlAAAAHnRSTlMAydnl77qbMLT093H7K4Nd4Ktn082+lYt5bkklEgP44nQSAAAApUlEQVQ4y73P2Q6DIBRF0cOgbRHHzhP//5m9mBAQKjG1cT0Yc7ITAMu1LNQgUZiQ2DYoNQ0sCQb6qgHAfRx48opq3J9AZ6xuF7uOew8Ik1OsCZRS2UAC9V+D9a+QZYxNA45YFQftPtSkATOhw7dAc0vPBwKWiIOjP0JZ0yMuQJ27g36DipOUsqRAM0dR8KD1/ILHaHSE/w8DIx09E3g/BTce6rHUB5sAPKvfF+JdAAAAAElFTkSuQmCC';
+
+/**
+ * Specifies the image URL to be used for the transparent background.
+ */
Editor.layersLargeImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAmVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v7///+bnZkkAAAAMnRSTlMABPr8ByiD88KsTi/rvJb272mjeUA1CuPe1M/KjVxYHxMP6KZ0S9nYzGRGGRaznpGIbzaGUf0AAAHESURBVDjLbZLZYoIwEEVDgLCjbKIgAlqXqt3m/z+uNwu1rcyDhjl3ktnYL7OY254C0VX3yWFZfzDrOClbbgKxi0YDHjwl4jbnRkXxJS/C1YP3DbBhD1n7Ex4uaAqdVDb3yJ/4J/3nJD2to/ngQz/DfUvzMp4JJ5sSCaF5oXmemgQDfDxzbi+Kq4sU+vNcuAmx94JtyOP2DD4Epz2asWSCz4Z/4fECxyNj9zC9xNLHcdPEO+awDKeSaUu0W4twZQiO2hYVisTR3RCtK/c1X6t4xMEpiGqXqVntEBLolkZZsKY4QtwH6jzq67dEHlJysB1aNOD3XT7n1UkasQN59L4yC2RELMDSeCRtz3yV22Ub3ozIUTknYx8JWqDdQxbUes98cR2kZtUSveF/bAhcedwEWmlxIkpZUy4XOCb6VBjjxHvbwo/1lBAHHi2JCr0NI570QhyHq/DhJoE2lLgyA4RVe6KmZ47O/3b86MCP0HWa73A8/C3SUc5Qc1ajt6fgpXJ+RGpMvDSchepZDOOQRcZVIKcK90x2D7etqtI+56+u6n3sPriO6nfphitR4+O2m3EbM7lh3me1FM1o+LMI887rN+s3/wZdTFlpNVJiOAAAAABJRU5ErkJggg==';
/**
@@ -682,6 +687,904 @@ OpenFile.prototype.cancel = function(cancel)
};
/**
+ * Basic dialogs that are available in the viewer (print dialog).
+ */
+function Dialog(editorUi, elt, w, h, modal, closable, onClose)
+{
+ var dx = 0;
+
+ if (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8))
+ {
+ // Adds padding as a workaround for box model in older IE versions
+ // This needs to match the total padding of geDialog in CSS
+ dx = 80;
+ }
+
+ w += dx;
+ h += dx;
+
+ var dh = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
+
+ var left = Math.max(1, Math.round((document.body.scrollWidth - w - 64) / 2));
+ var top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));
+
+ // Keeps window size inside available space
+ if (!mxClient.IS_QUIRKS)
+ {
+ elt.style.maxHeight = '100%';
+ }
+
+ w = Math.min(w, document.body.scrollWidth - 64);
+ h = Math.min(h, dh - 64);
+
+ // Increments zIndex to put subdialogs and background over existing dialogs and background
+ if (editorUi.dialogs.length > 0)
+ {
+ this.zIndex += editorUi.dialogs.length * 2;
+ }
+
+ var div = editorUi.createDiv('geDialog');
+ div.style.width = w + 'px';
+ div.style.height = h + 'px';
+ div.style.left = left + 'px';
+ div.style.top = top + 'px';
+ div.style.zIndex = this.zIndex;
+
+ if (this.bg == null)
+ {
+ this.bg = editorUi.createDiv('background');
+ this.bg.style.position = 'absolute';
+ this.bg.style.background = 'white';
+ this.bg.style.left = '0px';
+ this.bg.style.top = '0px';
+ this.bg.style.bottom = '0px';
+ this.bg.style.right = '0px';
+ this.bg.style.zIndex = this.zIndex - 2;
+
+ mxUtils.setOpacity(this.bg, this.bgOpacity);
+
+ if (mxClient.IS_QUIRKS)
+ {
+ new mxDivResizer(this.bg);
+ }
+ }
+
+ if (modal)
+ {
+ document.body.appendChild(this.bg);
+ }
+
+ div.appendChild(elt);
+ document.body.appendChild(div);
+
+ if (closable)
+ {
+ var img = document.createElement('img');
+
+ img.setAttribute('src', Dialog.prototype.closeImage);
+ img.setAttribute('title', mxResources.get('close'));
+ img.className = 'geDialogClose';
+ img.style.top = (top + 14) + 'px';
+ img.style.left = (left + w + 38 - dx) + 'px';
+ img.style.zIndex = this.zIndex;
+
+ mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
+ {
+ editorUi.hideDialog(true);
+ }));
+
+ document.body.appendChild(img);
+ this.dialogImg = img;
+
+ mxEvent.addGestureListeners(this.bg, null, null, mxUtils.bind(this, function(evt)
+ {
+ editorUi.hideDialog(true);
+ }));
+ }
+
+ this.onDialogClose = onClose;
+ this.container = div;
+
+ editorUi.editor.fireEvent(new mxEventObject('showDialog'));
+};
+
+/**
+ *
+ */
+Dialog.prototype.zIndex = mxPopupMenu.prototype.zIndex - 1;
+
+/**
+ *
+ */
+Dialog.prototype.noColorImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/nocolor.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC';
+
+/**
+ *
+ */
+Dialog.prototype.closeImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/close.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==';
+
+/**
+ *
+ */
+Dialog.prototype.clearImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/clear.gif' : 'data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==';
+
+/**
+ *
+ */
+Dialog.prototype.lockedImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/locked.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC';
+
+/**
+ *
+ */
+Dialog.prototype.unlockedImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/unlocked.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==';
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.bgOpacity = 80;
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.close = function(cancel)
+{
+ if (this.onDialogClose != null)
+ {
+ this.onDialogClose(cancel);
+ this.onDialogClose = null;
+ }
+
+ if (this.dialogImg != null)
+ {
+ this.dialogImg.parentNode.removeChild(this.dialogImg);
+ this.dialogImg = null;
+ }
+
+ if (this.bg != null && this.bg.parentNode != null)
+ {
+ this.bg.parentNode.removeChild(this.bg);
+ }
+
+ this.container.parentNode.removeChild(this.container);
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+var PrintDialog = function(editorUi, title)
+{
+ this.create(editorUi, title);
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.prototype.create = function(editorUi)
+{
+ var graph = editorUi.editor.graph;
+ var row, td;
+
+ var table = document.createElement('table');
+ table.style.width = '100%';
+ table.style.height = '100%';
+ var tbody = document.createElement('tbody');
+
+ row = document.createElement('tr');
+
+ var onePageCheckBox = document.createElement('input');
+ onePageCheckBox.setAttribute('type', 'checkbox');
+ td = document.createElement('td');
+ td.setAttribute('colspan', '2');
+ td.style.fontSize = '10pt';
+ td.appendChild(onePageCheckBox);
+
+ var span = document.createElement('span');
+ mxUtils.write(span, ' ' + mxResources.get('fitPage'));
+ td.appendChild(span);
+
+ mxEvent.addListener(span, 'click', function(evt)
+ {
+ onePageCheckBox.checked = !onePageCheckBox.checked;
+ pageCountCheckBox.checked = !onePageCheckBox.checked;
+ mxEvent.consume(evt);
+ });
+
+ mxEvent.addListener(onePageCheckBox, 'change', function()
+ {
+ pageCountCheckBox.checked = !onePageCheckBox.checked;
+ });
+
+ row.appendChild(td);
+ tbody.appendChild(row);
+
+ row = row.cloneNode(false);
+
+ var pageCountCheckBox = document.createElement('input');
+ pageCountCheckBox.setAttribute('type', 'checkbox');
+ td = document.createElement('td');
+ td.style.fontSize = '10pt';
+ td.appendChild(pageCountCheckBox);
+
+ var span = document.createElement('span');
+ mxUtils.write(span, ' ' + mxResources.get('posterPrint') + ':');
+ td.appendChild(span);
+
+ mxEvent.addListener(span, 'click', function(evt)
+ {
+ pageCountCheckBox.checked = !pageCountCheckBox.checked;
+ onePageCheckBox.checked = !pageCountCheckBox.checked;
+ mxEvent.consume(evt);
+ });
+
+ row.appendChild(td);
+
+ var pageCountInput = document.createElement('input');
+ pageCountInput.setAttribute('value', '1');
+ pageCountInput.setAttribute('type', 'number');
+ pageCountInput.setAttribute('min', '1');
+ pageCountInput.setAttribute('size', '4');
+ pageCountInput.setAttribute('disabled', 'disabled');
+ pageCountInput.style.width = '50px';
+
+ td = document.createElement('td');
+ td.style.fontSize = '10pt';
+ td.appendChild(pageCountInput);
+ mxUtils.write(td, ' ' + mxResources.get('pages') + ' (max)');
+ row.appendChild(td);
+ tbody.appendChild(row);
+
+ mxEvent.addListener(pageCountCheckBox, 'change', function()
+ {
+ if (pageCountCheckBox.checked)
+ {
+ pageCountInput.removeAttribute('disabled');
+ }
+ else
+ {
+ pageCountInput.setAttribute('disabled', 'disabled');
+ }
+
+ onePageCheckBox.checked = !pageCountCheckBox.checked;
+ });
+
+ row = row.cloneNode(false);
+
+ td = document.createElement('td');
+ mxUtils.write(td, mxResources.get('pageScale') + ':');
+ row.appendChild(td);
+
+ td = document.createElement('td');
+ var pageScaleInput = document.createElement('input');
+ pageScaleInput.setAttribute('value', '100 %');
+ pageScaleInput.setAttribute('size', '5');
+ pageScaleInput.style.width = '50px';
+
+ td.appendChild(pageScaleInput);
+ row.appendChild(td);
+ tbody.appendChild(row);
+
+ row = document.createElement('tr');
+ td = document.createElement('td');
+ td.colSpan = 2;
+ td.style.paddingTop = '20px';
+ td.setAttribute('align', 'right');
+
+ // Overall scale for print-out to account for print borders in dialogs etc
+ function preview(print)
+ {
+ var autoOrigin = onePageCheckBox.checked || pageCountCheckBox.checked;
+ var printScale = parseInt(pageScaleInput.value) / 100;
+
+ if (isNaN(printScale))
+ {
+ printScale = 1;
+ pageScaleInput.value = '100%';
+ }
+
+ // Workaround to match available paper size in actual print output
+ printScale *= 0.75;
+
+ var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;
+ var scale = 1 / graph.pageScale;
+
+ if (autoOrigin)
+ {
+ var pageCount = (onePageCheckBox.checked) ? 1 : parseInt(pageCountInput.value);
+
+ if (!isNaN(pageCount))
+ {
+ scale = mxUtils.getScaleForPageCount(pageCount, graph, pf);
+ }
+ }
+
+ // Negative coordinates are cropped or shifted if page visible
+ var gb = graph.getGraphBounds();
+ var border = 0;
+ var x0 = 0;
+ var y0 = 0;
+
+ // Applies print scale
+ pf = mxRectangle.fromRectangle(pf);
+ pf.width = Math.ceil(pf.width * printScale);
+ pf.height = Math.ceil(pf.height * printScale);
+ scale *= printScale;
+
+ // Starts at first visible page
+ if (!autoOrigin && graph.pageVisible)
+ {
+ var layout = graph.getPageLayout();
+ x0 -= layout.x * pf.width;
+ y0 -= layout.y * pf.height;
+ }
+ else
+ {
+ autoOrigin = true;
+ }
+
+ var preview = PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin);
+ preview.open();
+
+ if (print)
+ {
+ PrintDialog.printPreview(preview);
+ }
+ };
+
+ var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
+ {
+ editorUi.hideDialog();
+ });
+ cancelBtn.className = 'geBtn';
+
+ if (editorUi.editor.cancelFirst)
+ {
+ td.appendChild(cancelBtn);
+ }
+
+ if (PrintDialog.previewEnabled)
+ {
+ var previewBtn = mxUtils.button(mxResources.get('preview'), function()
+ {
+ editorUi.hideDialog();
+ preview(false);
+ });
+ previewBtn.className = 'geBtn';
+ td.appendChild(previewBtn);
+ }
+
+ var printBtn = mxUtils.button(mxResources.get((!PrintDialog.previewEnabled) ? 'ok' : 'print'), function()
+ {
+ editorUi.hideDialog();
+ preview(true);
+ });
+ printBtn.className = 'geBtn gePrimaryBtn';
+ td.appendChild(printBtn);
+
+ if (!editorUi.editor.cancelFirst)
+ {
+ td.appendChild(cancelBtn);
+ }
+
+ row.appendChild(td);
+ tbody.appendChild(row);
+
+ table.appendChild(tbody);
+ this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.printPreview = function(preview)
+{
+ if (preview.wnd != null)
+ {
+ var printFn = function()
+ {
+ preview.wnd.focus();
+ preview.wnd.print();
+ preview.wnd.close();
+ };
+
+ // Workaround for Google Chrome which needs a bit of a
+ // delay in order to render the SVG contents
+ // Needs testing in production
+ if (mxClient.IS_GC)
+ {
+ window.setTimeout(printFn, 500);
+ }
+ else
+ {
+ printFn();
+ }
+ }
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin)
+{
+ var preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);
+ preview.title = mxResources.get('preview');
+ preview.printBackgroundImage = true;
+ preview.autoOrigin = autoOrigin;
+ var bg = graph.background;
+
+ if (bg == null || bg == '' || bg == mxConstants.NONE)
+ {
+ bg = '#ffffff';
+ }
+
+ preview.backgroundColor = bg;
+
+ var writeHead = preview.writeHead;
+
+ // Adds a border in the preview
+ preview.writeHead = function(doc)
+ {
+ writeHead.apply(this, arguments);
+
+ doc.writeln('<style type="text/css">');
+ doc.writeln('@media screen {');
+ doc.writeln(' body > div { padding:30px;box-sizing:content-box; }');
+ doc.writeln('}');
+ doc.writeln('</style>');
+ };
+
+ return preview;
+};
+
+/**
+ * Specifies if the preview button should be enabled. Default is true.
+ */
+PrintDialog.previewEnabled = true;
+
+/**
+ * Constructs a new page setup dialog.
+ */
+var PageSetupDialog = function(editorUi)
+{
+ var graph = editorUi.editor.graph;
+ var row, td;
+
+ var table = document.createElement('table');
+ table.style.width = '100%';
+ table.style.height = '100%';
+ var tbody = document.createElement('tbody');
+
+ row = document.createElement('tr');
+
+ td = document.createElement('td');
+ td.style.verticalAlign = 'top';
+ td.style.fontSize = '10pt';
+ mxUtils.write(td, mxResources.get('paperSize') + ':');
+
+ row.appendChild(td);
+
+ td = document.createElement('td');
+ td.style.verticalAlign = 'top';
+ td.style.fontSize = '10pt';
+
+ var accessor = PageSetupDialog.addPageFormatPanel(td, 'pagesetupdialog', graph.pageFormat);
+
+ row.appendChild(td);
+ tbody.appendChild(row);
+
+ row = document.createElement('tr');
+
+ td = document.createElement('td');
+ mxUtils.write(td, mxResources.get('background') + ':');
+
+ row.appendChild(td);
+
+ td = document.createElement('td');
+ td.style.whiteSpace = 'nowrap';
+
+ var backgroundInput = document.createElement('input');
+ backgroundInput.setAttribute('type', 'text');
+ var backgroundButton = document.createElement('button');
+
+ backgroundButton.style.width = '18px';
+ backgroundButton.style.height = '18px';
+ backgroundButton.style.marginRight = '20px';
+ backgroundButton.style.backgroundPosition = 'center center';
+ backgroundButton.style.backgroundRepeat = 'no-repeat';
+
+ var newBackgroundColor = graph.background;
+
+ function updateBackgroundColor()
+ {
+ if (newBackgroundColor == null || newBackgroundColor == mxConstants.NONE)
+ {
+ backgroundButton.style.backgroundColor = '';
+ backgroundButton.style.backgroundImage = 'url(\'' + Dialog.prototype.noColorImage + '\')';
+ }
+ else
+ {
+ backgroundButton.style.backgroundColor = newBackgroundColor;
+ backgroundButton.style.backgroundImage = '';
+ }
+ };
+
+ updateBackgroundColor();
+
+ mxEvent.addListener(backgroundButton, 'click', function(evt)
+ {
+ editorUi.pickColor(newBackgroundColor || 'none', function(color)
+ {
+ newBackgroundColor = color;
+ updateBackgroundColor();
+ });
+ mxEvent.consume(evt);
+ });
+
+ td.appendChild(backgroundButton);
+
+ mxUtils.write(td, mxResources.get('gridSize') + ':');
+
+ var gridSizeInput = document.createElement('input');
+ gridSizeInput.setAttribute('type', 'number');
+ gridSizeInput.setAttribute('min', '0');
+ gridSizeInput.style.width = '40px';
+ gridSizeInput.style.marginLeft = '6px';
+
+ gridSizeInput.value = graph.getGridSize();
+ td.appendChild(gridSizeInput);
+
+ mxEvent.addListener(gridSizeInput, 'change', function()
+ {
+ var value = parseInt(gridSizeInput.value);
+ gridSizeInput.value = Math.max(1, (isNaN(value)) ? graph.getGridSize() : value);
+ });
+
+ row.appendChild(td);
+ tbody.appendChild(row);
+
+ row = document.createElement('tr');
+ td = document.createElement('td');
+
+ mxUtils.write(td, mxResources.get('image') + ':');
+
+ row.appendChild(td);
+ td = document.createElement('td');
+
+ var changeImageLink = document.createElement('a');
+ changeImageLink.style.textDecoration = 'underline';
+ changeImageLink.style.cursor = 'pointer';
+ changeImageLink.style.color = '#a0a0a0';
+
+ var newBackgroundImage = graph.backgroundImage;
+
+ function updateBackgroundImage()
+ {
+ if (newBackgroundImage == null)
+ {
+ changeImageLink.removeAttribute('title');
+ changeImageLink.style.fontSize = '';
+ changeImageLink.innerHTML = mxResources.get('change') + '...';
+ }
+ else
+ {
+ changeImageLink.setAttribute('title', newBackgroundImage.src);
+ changeImageLink.style.fontSize = '11px';
+ changeImageLink.innerHTML = newBackgroundImage.src.substring(0, 42) + '...';
+ }
+ };
+
+ mxEvent.addListener(changeImageLink, 'click', function(evt)
+ {
+ editorUi.showBackgroundImageDialog(function(image)
+ {
+ newBackgroundImage = image;
+ updateBackgroundImage();
+ });
+
+ mxEvent.consume(evt);
+ });
+
+ updateBackgroundImage();
+
+ td.appendChild(changeImageLink);
+
+ row.appendChild(td);
+ tbody.appendChild(row);
+
+ row = document.createElement('tr');
+ td = document.createElement('td');
+ td.colSpan = 2;
+ td.style.paddingTop = '16px';
+ td.setAttribute('align', 'right');
+
+ var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
+ {
+ editorUi.hideDialog();
+ });
+ cancelBtn.className = 'geBtn';
+
+ if (editorUi.editor.cancelFirst)
+ {
+ td.appendChild(cancelBtn);
+ }
+
+ var applyBtn = mxUtils.button(mxResources.get('apply'), function()
+ {
+ editorUi.hideDialog();
+ editorUi.setPageFormat(accessor.get());
+
+ if (graph.background != newBackgroundColor)
+ {
+ editorUi.setBackgroundColor(newBackgroundColor);
+ }
+
+ if (graph.backgroundImage !== newBackgroundImage)
+ {
+ editorUi.setBackgroundImage(newBackgroundImage);
+ }
+
+ if (graph.gridSize !== gridSizeInput.value)
+ {
+ graph.setGridSize(parseInt(gridSizeInput.value));
+ }
+ });
+ applyBtn.className = 'geBtn gePrimaryBtn';
+ td.appendChild(applyBtn);
+
+ if (!editorUi.editor.cancelFirst)
+ {
+ td.appendChild(cancelBtn);
+ }
+
+ row.appendChild(td);
+ tbody.appendChild(row);
+
+ table.appendChild(tbody);
+ this.container = table;
+};
+
+/**
+ *
+ */
+PageSetupDialog.addPageFormatPanel = function(div, namePostfix, pageFormat, pageFormatListener)
+{
+ var formatName = 'format-' + namePostfix;
+
+ var portraitCheckBox = document.createElement('input');
+ portraitCheckBox.setAttribute('name', formatName);
+ portraitCheckBox.setAttribute('type', 'radio');
+ portraitCheckBox.setAttribute('value', 'portrait');
+
+ var landscapeCheckBox = document.createElement('input');
+ landscapeCheckBox.setAttribute('name', formatName);
+ landscapeCheckBox.setAttribute('type', 'radio');
+ landscapeCheckBox.setAttribute('value', 'landscape');
+
+ var paperSizeSelect = document.createElement('select');
+ paperSizeSelect.style.marginBottom = '8px';
+ paperSizeSelect.style.width = '202px';
+
+ var formatDiv = document.createElement('div');
+ formatDiv.style.marginLeft = '4px';
+ formatDiv.style.width = '210px';
+ formatDiv.style.height = '24px';
+
+ portraitCheckBox.style.marginRight = '6px';
+ formatDiv.appendChild(portraitCheckBox);
+
+ var portraitSpan = document.createElement('span');
+ portraitSpan.style.maxWidth = '100px';
+ mxUtils.write(portraitSpan, mxResources.get('portrait'));
+ formatDiv.appendChild(portraitSpan);
+
+ landscapeCheckBox.style.marginLeft = '10px';
+ landscapeCheckBox.style.marginRight = '6px';
+ formatDiv.appendChild(landscapeCheckBox);
+
+ var landscapeSpan = document.createElement('span');
+ landscapeSpan.style.width = '100px';
+ mxUtils.write(landscapeSpan, mxResources.get('landscape'));
+ formatDiv.appendChild(landscapeSpan)
+
+ var customDiv = document.createElement('div');
+ customDiv.style.marginLeft = '4px';
+ customDiv.style.width = '210px';
+ customDiv.style.height = '24px';
+
+ var widthInput = document.createElement('input');
+ widthInput.setAttribute('size', '6');
+ widthInput.setAttribute('value', pageFormat.width);
+ customDiv.appendChild(widthInput);
+ mxUtils.write(customDiv, ' x ');
+
+ var heightInput = document.createElement('input');
+ heightInput.setAttribute('size', '6');
+ heightInput.setAttribute('value', pageFormat.height);
+ customDiv.appendChild(heightInput);
+ mxUtils.write(customDiv, ' pt');
+
+ formatDiv.style.display = 'none';
+ customDiv.style.display = 'none';
+
+ var pf = new Object();
+ var formats = PageSetupDialog.getFormats();
+
+ for (var i = 0; i < formats.length; i++)
+ {
+ var f = formats[i];
+ pf[f.key] = f;
+
+ var paperSizeOption = document.createElement('option');
+ paperSizeOption.setAttribute('value', f.key);
+ mxUtils.write(paperSizeOption, f.title);
+ paperSizeSelect.appendChild(paperSizeOption);
+ }
+
+ var customSize = false;
+
+ function listener(sender, evt, force)
+ {
+ if (force || (widthInput != document.activeElement && heightInput != document.activeElement))
+ {
+ var detected = false;
+
+ for (var i = 0; i < formats.length; i++)
+ {
+ var f = formats[i];
+
+ // Special case where custom was chosen
+ if (customSize)
+ {
+ if (f.key == 'custom')
+ {
+ paperSizeSelect.value = f.key;
+ customSize = false;
+ }
+ }
+ else if (f.format != null)
+ {
+ if (pageFormat.width == f.format.width && pageFormat.height == f.format.height)
+ {
+ paperSizeSelect.value = f.key;
+ portraitCheckBox.setAttribute('checked', 'checked');
+ portraitCheckBox.defaultChecked = true;
+ portraitCheckBox.checked = true;
+ landscapeCheckBox.removeAttribute('checked');
+ landscapeCheckBox.defaultChecked = false;
+ landscapeCheckBox.checked = false;
+ detected = true;
+ }
+ else if (pageFormat.width == f.format.height && pageFormat.height == f.format.width)
+ {
+ paperSizeSelect.value = f.key;
+ portraitCheckBox.removeAttribute('checked');
+ portraitCheckBox.defaultChecked = false;
+ portraitCheckBox.checked = false;
+ landscapeCheckBox.setAttribute('checked', 'checked');
+ landscapeCheckBox.defaultChecked = true;
+ landscapeCheckBox.checked = true;
+ detected = true;
+ }
+ }
+ }
+
+ // Selects custom format which is last in list
+ if (!detected)
+ {
+ widthInput.value = pageFormat.width;
+ heightInput.value = pageFormat.height;
+ paperSizeOption.setAttribute('selected', 'selected');
+ portraitCheckBox.setAttribute('checked', 'checked');
+ portraitCheckBox.defaultChecked = true;
+ formatDiv.style.display = 'none';
+ customDiv.style.display = '';
+ }
+ else
+ {
+ formatDiv.style.display = '';
+ customDiv.style.display = 'none';
+ }
+ }
+ };
+ listener();
+
+ div.appendChild(paperSizeSelect);
+ mxUtils.br(div);
+
+ div.appendChild(formatDiv);
+ div.appendChild(customDiv);
+
+ var currentPageFormat = pageFormat;
+
+ var update = function()
+ {
+ var f = pf[paperSizeSelect.value];
+
+ if (f.format != null)
+ {
+ widthInput.value = f.format.width;
+ heightInput.value = f.format.height;
+ customDiv.style.display = 'none';
+ formatDiv.style.display = '';
+ }
+ else
+ {
+ formatDiv.style.display = 'none';
+ customDiv.style.display = '';
+ }
+
+ var newPageFormat = new mxRectangle(0, 0, parseInt(widthInput.value), parseInt(heightInput.value));
+
+ if (paperSizeSelect.value != 'custom' && landscapeCheckBox.checked)
+ {
+ newPageFormat = new mxRectangle(0, 0, newPageFormat.height, newPageFormat.width);
+ }
+
+ if (newPageFormat.width != currentPageFormat.width || newPageFormat.height != currentPageFormat.height)
+ {
+ currentPageFormat = newPageFormat;
+
+ if (pageFormatListener != null)
+ {
+ pageFormatListener(currentPageFormat);
+ }
+ }
+ };
+
+ mxEvent.addListener(portraitSpan, 'click', function(evt)
+ {
+ portraitCheckBox.checked = true;
+ update();
+ mxEvent.consume(evt);
+ });
+
+ mxEvent.addListener(landscapeSpan, 'click', function(evt)
+ {
+ landscapeCheckBox.checked = true;
+ update();
+ mxEvent.consume(evt);
+ });
+
+ mxEvent.addListener(widthInput, 'blur', update);
+ mxEvent.addListener(widthInput, 'click', update);
+ mxEvent.addListener(heightInput, 'blur', update);
+ mxEvent.addListener(heightInput, 'click', update);
+ mxEvent.addListener(landscapeCheckBox, 'change', update);
+ mxEvent.addListener(portraitCheckBox, 'change', update);
+ mxEvent.addListener(paperSizeSelect, 'change', function()
+ {
+ // Handles special case where custom was chosen
+ customSize = paperSizeSelect.value == 'custom';
+ update();
+ });
+
+ update();
+
+ return {set: function(value)
+ {
+ pageFormat = value;
+ listener(null, null, true);
+ },get: function()
+ {
+ return currentPageFormat;
+ }, widthInput: widthInput,
+ heightInput: heightInput};
+};
+
+/**
+ *
+ */
+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: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1652)},
+ {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, 584, 826)},
+ {key: 'custom', title: mxResources.get('custom'), format: null}];
+};
+
+/**
* Static overrides
*/
(function()
diff --git a/war/js/mxgraph/EditorUi.js b/war/js/mxgraph/EditorUi.js
index 0f7fd58f..acf7ecbe 100644
--- a/war/js/mxgraph/EditorUi.js
+++ b/war/js/mxgraph/EditorUi.js
@@ -1374,8 +1374,12 @@ EditorUi.prototype.initCanvas = function()
this.chromelessToolbar.style.backgroundColor = '#000000';
this.chromelessToolbar.style.padding = '10px 10px 8px 10px';
this.chromelessToolbar.style.left = '50%';
- mxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'borderRadius', '20px');
- mxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'transition', 'opacity 600ms ease-in-out');
+
+ if (!mxClient.IS_VML)
+ {
+ mxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'borderRadius', '20px');
+ mxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'transition', 'opacity 600ms ease-in-out');
+ }
var updateChromelessToolbarPosition = mxUtils.bind(this, function()
{
@@ -1418,7 +1422,7 @@ EditorUi.prototype.initCanvas = function()
{
this.actions.get('previousPage').funct();
mxEvent.consume(evt);
- }), Editor.previousLargeImage, mxResources.get('previousPage') || 'Previous Page');
+ }), Editor.previousLargeImage, mxResources.get('previousPage'));
var pageInfo = document.createElement('div');
@@ -1433,7 +1437,7 @@ EditorUi.prototype.initCanvas = function()
{
this.actions.get('nextPage').funct();
mxEvent.consume(evt);
- }), Editor.nextLargeImage, mxResources.get('nextPage') || 'Next Page');
+ }), Editor.nextLargeImage, mxResources.get('nextPage'));
var updatePageInfo = mxUtils.bind(this, function()
{
@@ -1474,13 +1478,13 @@ EditorUi.prototype.initCanvas = function()
{
this.actions.get('zoomOut').funct();
mxEvent.consume(evt);
- }), Editor.zoomOutLargeImage, (mxResources.get('zoomOut') || 'Zoom Out') + ' (Alt+Mousewheel)');
+ }), Editor.zoomOutLargeImage, mxResources.get('zoomOut') + ' (Alt+Mousewheel)');
addButton(mxUtils.bind(this, function(evt)
{
this.actions.get('zoomIn').funct();
mxEvent.consume(evt);
- }), Editor.zoomInLargeImage, (mxResources.get('zoomIn') || 'Zoom In') + ' (Alt+Mousewheel)');
+ }), Editor.zoomInLargeImage, mxResources.get('zoomIn') + ' (Alt+Mousewheel)');
addButton(mxUtils.bind(this, function(evt)
{
@@ -1503,7 +1507,7 @@ EditorUi.prototype.initCanvas = function()
}
mxEvent.consume(evt);
- }), Editor.actualSizeLargeImage, mxResources.get('fit') || 'Fit');
+ }), Editor.actualSizeLargeImage, mxResources.get('fit'));
// Changes toolbar opacity on hover
var fadeThread = null;
@@ -1597,7 +1601,7 @@ EditorUi.prototype.initCanvas = function()
}
mxEvent.consume(evt);
- }), Editor.layersLargeImage, mxResources.get('layers') || 'Layers');
+ }), Editor.layersLargeImage, mxResources.get('layers'));
// Shows/hides layers button depending on content
var model = graph.getModel();
@@ -1607,7 +1611,13 @@ EditorUi.prototype.initCanvas = function()
layersButton.style.display = (model.getChildCount(model.root) > 1) ? '' : 'none';
});
}
-
+
+ addButton(mxUtils.bind(this, function(evt)
+ {
+ this.actions.get('print').funct();
+ mxEvent.consume(evt);
+ }), Editor.printLargeImage, mxResources.get('print'));
+
if (this.editor.editButtonLink != null)
{
addButton(mxUtils.bind(this, function(evt)
@@ -1622,9 +1632,9 @@ EditorUi.prototype.initCanvas = function()
}
mxEvent.consume(evt);
- }), Editor.editLargeImage, mxResources.get('openInNewWindow') || 'Open in New Window');
+ }), Editor.editLargeImage, mxResources.get('openInNewWindow'));
}
-
+
if (graph.lightbox && this.container != document.body)
{
addButton(mxUtils.bind(this, function(evt)
@@ -1638,14 +1648,14 @@ EditorUi.prototype.initCanvas = function()
this.destroy();
mxEvent.consume(evt);
}
- }), Editor.closeLargeImage, (mxResources.get('close') || 'Close') + ' (Escape)');
+ }), Editor.closeLargeImage, mxResources.get('close') + ' (Escape)');
}
// Initial state invisible
this.chromelessToolbar.style.display = 'none';
+ mxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'transform', 'translate(-50%,0)');
graph.container.appendChild(this.chromelessToolbar);
- this.chromelessToolbar.style.marginLeft = -(btnCount * 24 + 10) + 'px';
-
+
// Installs handling of hightligh and handling links to relative links and anchors
this.addChromelessClickHandler();
diff --git a/war/js/reader.min.js b/war/js/reader.min.js
index ff1d580a..21781d59 100644
--- a/war/js/reader.min.js
+++ b/war/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
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");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,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:"6.6.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:"6.6.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/")||
diff --git a/war/js/viewer.min.js b/war/js/viewer.min.js
index a4193fe2..6e414977 100644
--- a/war/js/viewer.min.js
+++ b/war/js/viewer.min.js
@@ -44,19 +44,19 @@ 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 m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,n=/[#\/\?@]/g,p=/[\#\?]/g;f.parse=a;f.create=function(a,d,e,k,g,l,m){a=new f(b(a,n),b(d,n),"string"==typeof e?encodeURIComponent(e):null,0<k?k.toString():null,b(g,p),null,"string"==typeof m?encodeURIComponent(m):null);l&&("string"===typeof l?a.O(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,c)):a.ba(l));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,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(x,c)+'")':'url("about:blank")'}function c(a){return A[a]}function d(a,b){return a?f.ha.N(a,b):b}function p(a,b,c){if(!c)return null;var d=(""+a).match(v);return!d||d[1]&&!H.test(d[1])?null:c(a,b)}function z(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
-"")}var x=/[\n\f\r\"\'()*<>]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,H=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function F(f,k,g,l,m){f=z(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y<k.length;++y){var x=k[y].toLowerCase(),v=x.charCodeAt(0),A,H,I,G,E,N;if(32===v)x="";else if(34===v)x=16===r?g?a(p(d(l,e(k[y].substring(1,x.length-1))),f,g)):"":
-q&8&&!(r&r-1)?x:"";else if("inherit"!==x){if(E=n.cssLitGroup){var M;if(!(M=n.cssLitMap)){M={};for(var P=E.length;0<=--P;)for(var V=E[P],ga=V.length;0<=--ga;)M[V[ga]]=c;M=n.cssLitMap=M}E=M}else E=c;if(N=E,N[z(x)]!==c)if(35===v&&/^#(?:[0-9a-f]{3}){1,2}$/.test(x))x=q&2?x:"";else if(48<=v&&57>=v)x=q&1?x:"";else if(A=x.charCodeAt(1),H=x.charCodeAt(2),I=48<=A&&57>=A,G=48<=H&&57>=H,43===v&&(I||46===A&&G))x=q&1?(I?"":"0")+x.substring(1):"";else if(45===v&&(I||46===A&&G))x=q&4?(I?"-":"-0")+x.substring(1):
-q&1?"0":"";else if(46===v&&I)x=q&1?"0"+x:"";else if('url("'===x.substring(0,5))x=g&&q&16?a(p(d(l,k[y].substring(5,x.length-2)),f,g)):"";else if("("===x.charAt(x.length-1))a:{E=k;M=y;x=1;P=M+1;for(v=E.length;P<v&&x;)V=E[P++],x+=")"===V?-1:/^[^"']*\($/.test(V);if(!x)for(x=E[M].toLowerCase(),v=z(x),E=E.splice(M,P-M,""),M=n.cssFns,P=0,V=M.length;P<V;++P)if(M[P].substring(0,v.length)==v){E[0]=E[E.length-1]="";F(M[P],E,g,l);x=x+E.join(" ")+")";break a}x=""}else x=t&&/^-?[a-z_][\w\-]*$/.test(x)&&!/__$/.test(x)?
-m&&512===t?k[y]+m:1024===t&&b[x]&&"number"===typeof b[x].oa?x:"":/^\w+$/.test(x)&&64===r&&q&8?u+1===C?(k[u]=k[u].substring(0,k[u].length-1)+" "+x+'"',""):(u=C,'"'+x+'"'):""}x&&(k[C++]=x)}1===C&&'url("about:blank")'===k[0]&&(C=0);k.length=C}else k.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)$/,
+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,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(y,c)+'")':'url("about:blank")'}function c(a){return A[a]}function d(a,b){return a?f.ha.N(a,b):b}function p(a,b,c){if(!c)return null;var d=(""+a).match(v);return!d||d[1]&&!E.test(d[1])?null:c(a,b)}function z(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
+"")}var y=/[\n\f\r\"\'()*<>]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,E=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function F(f,k,g,l,m){f=z(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,x=0,D=0;x<k.length;++x){var v=k[x].toLowerCase(),y=v.charCodeAt(0),A,E,G,I,H,N;if(32===y)v="";else if(34===y)v=16===r?g?a(p(d(l,e(k[x].substring(1,v.length-1))),f,g)):"":
+q&8&&!(r&r-1)?v:"";else if("inherit"!==v){if(H=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var P=H.length;0<=--P;)for(var V=H[P],ga=V.length;0<=--ga;)L[V[ga]]=c;L=n.cssLitMap=L}H=L}else H=c;if(N=H,N[z(v)]!==c)if(35===y&&/^#(?:[0-9a-f]{3}){1,2}$/.test(v))v=q&2?v:"";else if(48<=y&&57>=y)v=q&1?v:"";else if(A=v.charCodeAt(1),E=v.charCodeAt(2),G=48<=A&&57>=A,I=48<=E&&57>=E,43===y&&(G||46===A&&I))v=q&1?(G?"":"0")+v.substring(1):"";else if(45===y&&(G||46===A&&I))v=q&4?(G?"-":"-0")+v.substring(1):
+q&1?"0":"";else if(46===y&&G)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[x].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;L=x;v=1;P=L+1;for(y=H.length;P<y&&v;)V=H[P++],v+=")"===V?-1:/^[^"']*\($/.test(V);if(!v)for(v=H[L].toLowerCase(),y=z(v),H=H.splice(L,P-L,""),L=n.cssFns,P=0,V=L.length;P<V;++P)if(L[P].substring(0,y.length)==y){H[0]=H[H.length-1]="";F(L[P],H,g,l);v=v+H.join(" ")+")";break a}v=""}else v=t&&/^-?[a-z_][\w\-]*$/.test(v)&&!/__$/.test(v)?
+m&&512===t?k[x]+m:1024===t&&b[v]&&"number"===typeof b[v].oa?v:"":/^\w+$/.test(v)&&64===r&&q&8?u+1===D?(k[u]=k[u].substring(0,k[u].length-1)+" "+v+'"',""):(u=D,'"'+v+'"'):""}v&&(k[D++]=v)}1===D&&'url("about:blank")'===k[0]&&(D=0);k.length=D}else k.length=0}}();var H=/^(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)$/,
G={};G[">"]=G["+"]=G["~"]=G;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c<d&&((r=a[c],"*"===r)?(++c,g=r):/^[a-zA-Z]/.test(r)&&(l=k(r.toLowerCase(),[]))&&("tagName"in l&&(r=l.tagName),++c,g=r));for(p=m=l="";t&&c<d;++c)if(r=a[c],"#"===r.charAt(0))/^#_|__$|[^\w#:\-]/.test(r)?t=!1:l+=r+f;else if("."===r)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(r=a[c])&&!/^_|__$/.test(r)?l+="."+r:t=!1;else if(c+1<d&&"["===a[c]){++c;var F=a[c++].toLowerCase();r=q.m[g+"::"+F];r!==+r&&(r=q.m["*::"+
-F]);var u;b.ia?(u=b.ia(g,F),"string"!==typeof u&&(t=!1,u=F),t&&r!==+r&&(r=q.d.NONE)):(u=F,r!==+r&&(t=!1));var y=F="",D=!1;/^[~^$*|]?=$/.test(a[c])&&(F=a[c++],y=a[c++],/^[0-9A-Za-z:_\-]+$/.test(y)?y='"'+y+'"':"]"===y&&(y='""',--c),/^"([^\"\\]|\\.)*"$/.test(y)||(t=!1),(D="i"===a[c])&&++c);"]"!==a[c]&&(++c,t=!1);switch(r){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==F&&"~="!==F&&"$="!==F||'""'==y||D?"|="===F||""===F||(t=!1):y='"'+y.substring(1,
-y.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==F&&(t=!1);break;default:t=!1}t&&(m+="["+u.replace(/[^\w-]/g,"\\$&")+F+y+(D?" i]":"]"))}else if(c<d&&":"===a[c])if(r=a[++c],E.test(r))p+=":"+r;else break;else break;c!==d&&(t=!1);t&&(c=(g+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+e)&&n.push(c);return t}" "===a[d]&&++d;l-1!==d&&" "===a[l]&&--l;for(var n=[],p=d,r=!0,t=d;r&&t<l;++t){var F=a[t];if(G[F]===G||" "===F)m(p,t,F)?p=t+1:r=!1}m(p,l,"")||(r=!1);return r?(n.length&&(p=n.join(""),null!==
+F]);var u;b.ia?(u=b.ia(g,F),"string"!==typeof u&&(t=!1,u=F),t&&r!==+r&&(r=q.d.NONE)):(u=F,r!==+r&&(t=!1));var x=F="",C=!1;/^[~^$*|]?=$/.test(a[c])&&(F=a[c++],x=a[c++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--c),/^"([^\"\\]|\\.)*"$/.test(x)||(t=!1),(C="i"===a[c])&&++c);"]"!==a[c]&&(++c,t=!1);switch(r){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==F&&"~="!==F&&"$="!==F||'""'==x||C?"|="===F||""===F||(t=!1):x='"'+x.substring(1,
+x.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==F&&(t=!1);break;default:t=!1}t&&(m+="["+u.replace(/[^\w-]/g,"\\$&")+F+x+(C?" i]":"]"))}else if(c<d&&":"===a[c])if(r=a[++c],H.test(r))p+=":"+r;else break;else break;c!==d&&(t=!1);t&&(c=(g+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+e)&&n.push(c);return t}" "===a[d]&&++d;l-1!==d&&" "===a[l]&&--l;for(var n=[],p=d,r=!0,t=d;r&&t<l;++t){var F=a[t];if(G[F]===G||" "===F)m(p,t,F)?p=t+1:r=!1}m(p,l,"")||(r=!1);return r?(n.length&&(p=n.join(""),null!==
e&&(p="."+e+" "+p),g.push(p)),!0):!c||c(a.slice(d,l))}var e=b.na,f=b.L,k=b.Aa,g=[],l=0,m,n=0,p;for(m=0;m<a.length;++m)(p=a[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==a[m]&&(n||G[a[m-1]]===G||G[a[m+1]]===G))||(a[l++]=a[m]);a.length=l;l=a.length;for(m=n=0;m<l;++m)if(","===a[m]){if(!d(n,m))return null;n=m+1}return d(n,l)?g: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;
-m=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}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,l,q,r,t){function F(){C=
-z.length&&null===z[z.length-1]}var u=void 0,y=t||[0],z=[],C=!1;n(e,{startStylesheet:function(){u=[]},endStylesheet:function(){},startAtrule:function(e,k){if(C)e=null;else if("@media"===e)u.push("@media"," ",m(k));else if("@keyframes"===e||"@-webkit-keyframes"===e){var g=k[0];1!==k.length||/__$|[^\w\-]/.test(g)?e=null:(u.push(e," ",g+f.L),e="@keyframes")}else if("@import"===e&&0<k.length)if(e=null,"function"===typeof r){var n=m(k.slice(1));if("not all"!==n){++y[0];var t=[];u.push(t);var F=p(d(c,a(k[0])),
-function(a){var c=b(F,a.qa,f,l,q,r,y);--y[0];a=n?{toString:function(){return"@media "+n+" {"+c.result+"}"}}:c.result;t[0]=a;r(a,!!y[0])},q)}}else window.console&&window.console.log("@import "+k.join(" ")+" elided");C=!e;z.push(e)},endAtrule:function(){z.pop();C||u.push(";");F()},startBlock:function(){C||u.push("{")},endBlock:function(){C||(u.push("}"),C=!0)},startRuleset:function(a){if(!C){var b=void 0;"@keyframes"===z[z.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-C=!b,b&&(b=b[0].replace(/ +/g,""))):(a=k(a,f),a&&a.length?b=a.join(", "):C=!0);C||u.push(b,"{")}z.push(null)},endRuleset:function(){z.pop();C||u.push("}");F()},declaration:function(a,b){if(!C){var d=!1,e=b.length;2<=e&&"!"===b[e-2]&&"important"===b[e-1].toLowerCase()&&(d=!0,b.length-=2);g(a,b,l,c,f.L);b.length&&u.push(a,":",b.join(" "),d?" !important;":";")}}});return{result:{toString:function(){return u.join("")}},va:!!y[0]}}l=function(a,c,d,e){return b(a,c,d,e,void 0,void 0).result.toString()}})()})();
+m=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}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,l,q,r,t){function F(){D=
+z.length&&null===z[z.length-1]}var u=void 0,x=t||[0],z=[],D=!1;n(e,{startStylesheet:function(){u=[]},endStylesheet:function(){},startAtrule:function(e,k){if(D)e=null;else if("@media"===e)u.push("@media"," ",m(k));else if("@keyframes"===e||"@-webkit-keyframes"===e){var g=k[0];1!==k.length||/__$|[^\w\-]/.test(g)?e=null:(u.push(e," ",g+f.L),e="@keyframes")}else if("@import"===e&&0<k.length)if(e=null,"function"===typeof r){var n=m(k.slice(1));if("not all"!==n){++x[0];var t=[];u.push(t);var F=p(d(c,a(k[0])),
+function(a){var c=b(F,a.qa,f,l,q,r,x);--x[0];a=n?{toString:function(){return"@media "+n+" {"+c.result+"}"}}:c.result;t[0]=a;r(a,!!x[0])},q)}}else window.console&&window.console.log("@import "+k.join(" ")+" elided");D=!e;z.push(e)},endAtrule:function(){z.pop();D||u.push(";");F()},startBlock:function(){D||u.push("{")},endBlock:function(){D||(u.push("}"),D=!0)},startRuleset:function(a){if(!D){var b=void 0;"@keyframes"===z[z.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+D=!b,b&&(b=b[0].replace(/ +/g,""))):(a=k(a,f),a&&a.length?b=a.join(", "):D=!0);D||u.push(b,"{")}z.push(null)},endRuleset:function(){z.pop();D||u.push("}");F()},declaration:function(a,b){if(!D){var d=!1,e=b.length;2<=e&&"!"===b[e-2]&&"important"===b[e-1].toLowerCase()&&(d=!0,b.length-=2);g(a,b,l,c,f.L);b.length&&u.push(a,":",b.join(" "),d?" !important;":";")}}});return{result:{toString:function(){return u.join("")}},va:!!x[0]}}l=function(a,c,d,e){return b(a,c,d,e,void 0,void 0).result.toString()}})()})();
"undefined"!==typeof window&&(window.sanitizeCssProperty=g,window.sanitizeCssSelectorList=k,window.sanitizeStylesheet=l,window.sanitizeMediaQuery=m);var n,p;(function(){function a(a,c,d,e,f){for(var k=c++;c<d&&"{"!==a[c]&&";"!==a[c];)++c;if(c<d&&(f||";"===a[c])){f=k+1;var g=c;f<d&&" "===a[f]&&++f;g>f&&" "===a[g-1]&&--g;e.startAtrule&&e.startAtrule(a[k].toLowerCase(),a.slice(f,g));c="{"===a[c]?b(a,c,d,e):c+1;e.endAtrule&&e.endAtrule()}return c}function b(d,e,f,k){++e;for(k.startBlock&&k.startBlock();e<
f;){var g=d[e].charAt(0);if("}"==g){++e;break}e=" "===g||";"===g?e+1:"@"===g?a(d,e,f,k,!1):"{"===g?b(d,e,f,k):c(d,e,f,k)}k.endBlock&&k.endBlock();return e}function c(a,b,c,d){var f=b,g=e(a,b,c,!0);if(0>g)return g=~g,g===f?g+1:g;var l=a[g];if("{"!==l)return g===f?g+1:g;b=g+1;g>f&&" "===a[g-1]&&--g;for(d.startRuleset&&d.startRuleset(a.slice(f,g));b<c;){l=a[b];if("}"===l){++b;break}b=" "===l?b+1:k(a,b,c,d)}d.endRuleset&&d.endRuleset();return b}function e(a,b,c,d){for(var e,f=[],k=-1;b<c;++b)if(e=a[b].charAt(0),
"["===e||"("===e)f[++k]=e;else if("]"===e&&"["===f[k]||")"===e&&"("===f[k])--k;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;0<=k&&(b=~(b+1));return b}function f(a,b,c){for(;b<c&&";"!==a[b]&&"}"!==a[b];)++b;return b<c&&";"===a[b]?b+1:b}function k(a,b,c,d){var k=a[b++];if(!g.test(k))return f(a,b,c);b<c&&" "===a[b]&&++b;if(b==c||":"!==a[b])return f(a,b,c);++b;b<c&&" "===a[b]&&++b;var l=e(a,b,c,!1);if(0>l)l=~l;else{for(var m=[],n=0,p=b;p<l;++p)b=a[p]," "!==b&&(m[n++]=b);if(l<c){do{b=
@@ -80,21 +80,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"};q.ELEMENT_DOM_INTERFACES=q.Q;q.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};q.ueffects=q.P;q.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};
-q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(a){function b(a,b){var c;if(ba.hasOwnProperty(b))c=ba[b];else{var d=b.match(T);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(D))?String.fromCharCode(parseInt(d[1],
-16)):L&&ca.test(b)?(L.innerHTML="&"+b+";",d=L.textContent,ba[b]=d):"&"+b+";"}return c}function c(a){return a.replace(X,b)}function d(a){return(""+a).replace(K,"&amp;").replace(S,"&lt;").replace(Y,"&gt;").replace(aa,"&#34;")}function e(a){return a.replace(O,"&amp;$1").replace(S,"&lt;").replace(Y,"&gt;")}function k(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(W)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d<q;){var r=c[d++],t=c[d];switch(r){case "&":fa.test(t)?(b.e&&b.e("&"+t,f,R,g(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,R,g(b,c,d,e,f));break;case "</":if(k=/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===
-t.length&&">"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,R,g(b,c,d,e,f));else{var F=c,u=d,y=b,D=f,z=R,C=e,x=n(F,u);x?(y.t&&y.t(x.name,D,z,g(y,F,u,C,D)),d=x.next):d=F.length}else b.e&&b.e("&lt;/",f,R,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,R,g(b,c,d,e,f));var V=a.f[p];V&Z&&(d=m(c,{name:p,next:d,c:V},b,f,R,e))}else{var F=c,u=b,y=f,D=R,z=e,ha=n(F,d);ha?(u.w&&u.w(ha.name,ha.R,y,D,g(u,F,ha.next,
-z,y)),d=ha.c&Z?m(F,ha,u,y,D,z):ha.next):d=F.length}else b.e&&b.e("&lt;",f,R,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l<q&&(">"!==c[l]||!/--$/.test(c[l-1]));l++);if(l<q){if(b.A){var v=c.slice(d,l).join("");b.A(v.substr(0,v.length-2),f,R,g(b,c,l+1,e,f))}d=l+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,R,g(b,c,d,e,f));break;case "<!":if(/^\w/.test(t)){if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,R,g(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,R,g(b,c,d,e,f));break;
-case "<?":if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,R,g(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,R,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,R,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(ea){if(ea!==R)throw ea;}}function m(b,c,d,f,k,l){var m=b.length;V.hasOwnProperty(c.name)||(V[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=V[c.name],p=c.next,q=c.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(c.c&a.c.CDATA)d.z&&
-d.z(m,f,k,g(d,b,q,l,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(m),f,k,g(d,b,q,l,f));else throw Error("bug");return q}function n(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var k=b[d].substr(e[0].length),g=d+1,l=b.length;g<l&&">"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=Q.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g<l;g++){if(n){if(">"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n=
-e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(J,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
+q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(a){function b(a,b){var c;if(aa.hasOwnProperty(b))c=aa[b];else{var d=b.match(S);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(C))?String.fromCharCode(parseInt(d[1],
+16)):K&&W.test(b)?(K.innerHTML="&"+b+";",d=K.textContent,aa[b]=d):"&"+b+";"}return c}function c(a){return a.replace(X,b)}function d(a){return(""+a).replace(J,"&amp;").replace(T,"&lt;").replace(ba,"&gt;").replace(Y,"&#34;")}function e(a){return a.replace(M,"&amp;$1").replace(T,"&lt;").replace(ba,"&gt;")}function k(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(Z)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d<q;){var r=c[d++],t=c[d];switch(r){case "&":O.test(t)?(b.e&&b.e("&"+t,f,R,g(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,R,g(b,c,d,e,f));break;case "</":if(k=/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===
+t.length&&">"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,R,g(b,c,d,e,f));else{var u=c,F=d,x=b,z=f,C=R,D=e,v=n(u,F);v?(x.t&&x.t(v.name,z,C,g(x,u,F,D,z)),d=v.next):d=u.length}else b.e&&b.e("&lt;/",f,R,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,R,g(b,c,d,e,f));var y=a.f[p];y&ca&&(d=m(c,{name:p,next:d,c:y},b,f,R,e))}else{var u=c,F=b,x=f,z=R,C=e,V=n(u,d);V?(F.w&&F.w(V.name,V.R,x,z,g(F,u,V.next,C,x)),
+d=V.c&ca?m(u,V,F,x,z,C):V.next):d=u.length}else b.e&&b.e("&lt;",f,R,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l<q&&(">"!==c[l]||!/--$/.test(c[l-1]));l++);if(l<q){if(b.A){var ha=c.slice(d,l).join("");b.A(ha.substr(0,ha.length-2),f,R,g(b,c,l+1,e,f))}d=l+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,R,g(b,c,d,e,f));break;case "<!":if(/^\w/.test(t)){if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,R,g(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,R,g(b,c,d,e,f));break;case "<?":if(!e.r){for(l=
+d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,R,g(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,R,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,R,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==R)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;V.hasOwnProperty(c.name)||(V[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=V[c.name],p=c.next,q=c.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(c.c&a.c.CDATA)d.z&&d.z(m,f,k,g(d,b,
+q,l,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(m),f,k,g(d,b,q,l,f));else throw Error("bug");return q}function n(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var k=b[d].substr(e[0].length),g=d+1,l=b.length;g<l&&">"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=Q.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g<l;g++){if(n){if(">"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n=
+e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(da,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
if("attribs"in m)k=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=a.f[n]):(n=c,m=l);if(l&a.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===c&&(p.v!==n||c!==n)&&g.push("</",p.v,">")}l&a.c.EMPTY||e.push({D:c,v:n});g.push("<",n);c=0;for(p=k.length;c<p;c+=2){var q=k[c],r=k[c+1];null!==r&&void 0!==r&&g.push(" ",q,'="',d(r),'"')}g.push(">");l&a.c.EMPTY&&!(m&a.c.EMPTY)&&g.push("</",n,">")}else f=!(l&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 k=e[d].D;if(k===b)break;if(!(a.f[k]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(k=e.length;--k>d;){var g=e[k].v;a.f[g]&a.c.OPTIONAL_ENDTAG||c.push("</",g,">")}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 q(a,b,c,d,e){if(!e)return null;try{var k=
f.parse(""+a);if(k&&(!k.K()||ga.test(k.W()))){var g=e(k,b,c,d);return g?g.toString():null}}catch(ja){}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 F(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function I(b,c,d,e,f){for(var k=0;k<c.length;k+=2){var g=c[k],l=c[k+1],m=l,n=null,p;if((p=
b+"::"+g,a.m.hasOwnProperty(p))||(p="*::"+g,a.m.hasOwnProperty(p)))n=a.m[p];if(null!==n)switch(n){case a.d.NONE:break;case a.d.SCRIPT:l=null;f&&r(f,b,g,m,l);break;case a.d.STYLE:if("undefined"===typeof U){l=null;f&&r(f,b,g,m,l);break}var t=[];U(l,{declaration:function(b,c){var e=b.toLowerCase();P(e,c,d?function(b){return q(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&t.push(e+": "+c.join(" "))}});l=0<t.length?t.join(" ; "):null;f&&r(f,b,g,m,l);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:l=
-e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,F(a.J,b,g),F(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function N(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:I(e,f,b,c,d)}}}function M(a,b){var c=[];p(b)(a,
-c);return c.join("")}var U,P;"undefined"!==typeof window&&(U=window.parseCssDeclarations,P=window.sanitizeCssProperty);var ba={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},T=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,ca=/^[A-Za-z][A-za-z0-9]+$/,L="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,J=/\0/g,X=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,fa=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,K=/&/g,O=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,
-S=/[<]/g,Y=/>/g,aa=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,W=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,R={},V={},ga=/^(?:https?|mailto|data)$/i,da={};da.pa=da.escapeAttrib=d;da.ra=da.makeHtmlSanitizer=p;da.sa=da.makeSaxParser=k;da.ta=da.makeTagPolicy=N;da.wa=da.normalizeRCData=e;da.xa=da.sanitize=function(a,b,c,d){return M(a,N(b,c,d))};da.ya=da.sanitizeAttribs=I;da.za=da.sanitizeWithPolicy=M;da.Ba=da.unescapeEntities=c;return da}(q);
+e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,F(a.J,b,g),F(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function N(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:I(e,f,b,c,d)}}}function L(a,b){var c=[];p(b)(a,
+c);return c.join("")}var U,P;"undefined"!==typeof window&&(U=window.parseCssDeclarations,P=window.sanitizeCssProperty);var aa={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},S=/^#(\d+)$/,C=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,K="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,da=/\0/g,X=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,O=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,J=/&/g,M=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T=
+/[<]/g,ba=/>/g,Y=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Z=3==="a,b".split(/(,)/).length,ca=a.c.CDATA|a.c.RCDATA,R={},V={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=N;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return L(a,N(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=L;ea.Ba=ea.unescapeEntities=c;return ea}(q);
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,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(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+=
@@ -106,8 +106,8 @@ new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/defla
f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),d=g.deflate(f,e),1!==d&&d!==q)return this.onEnd(d),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==e&&2!==e)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0<f.avail_in||0===f.avail_out)&&1!==d);return 4===e?(d=g.deflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===q):2!==e||(this.onEnd(q),f.avail_out=0,!0)};e.prototype.onData=
function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===q&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Deflate=e;d.deflate=f;d.deflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.gzip=function(b,c){return c=c||{},c.gzip=!0,f(b,c)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(b,c,d){function e(b){if(!(this instanceof
e))return new e(b);var c=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},b||{});c.raw&&0<=c.windowBits&&16>c.windowBits&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15));!(0<=c.windowBits&&16>c.windowBits)||b&&b.windowBits||(c.windowBits+=32);15<c.windowBits&&48>c.windowBits&&0===(15&c.windowBits)&&(c.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;b=g.inflateInit2(this.strm,c.windowBits);if(b!==m.Z_OK)throw Error(n[b]);
-this.header=new q;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/constants"),n=b("./zlib/messages"),p=b("./zlib/zstream"),q=b("./zlib/gzheader"),r=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,n,p,q,t=this.strm,u=this.options.chunkSize,C=this.options.dictionary,B=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH;
-"string"==typeof b?t.input=l.binstring2buf(b):"[object ArrayBuffer]"===r.call(b)?t.input=new Uint8Array(b):t.input=b;t.next_in=0;t.avail_in=t.input.length;do{if(0===t.avail_out&&(t.output=new k.Buf8(u),t.next_out=0,t.avail_out=u),d=g.inflate(t,m.Z_NO_FLUSH),d===m.Z_NEED_DICT&&C&&(q="string"==typeof C?l.string2buf(C):"[object ArrayBuffer]"===r.call(C)?new Uint8Array(C):C,d=g.inflateSetDictionary(this.strm,q)),d===m.Z_BUF_ERROR&&!0===B&&(d=m.Z_OK,B=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d),
+this.header=new q;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/constants"),n=b("./zlib/messages"),p=b("./zlib/zstream"),q=b("./zlib/gzheader"),r=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,n,p,q,t=this.strm,u=this.options.chunkSize,D=this.options.dictionary,B=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH;
+"string"==typeof b?t.input=l.binstring2buf(b):"[object ArrayBuffer]"===r.call(b)?t.input=new Uint8Array(b):t.input=b;t.next_in=0;t.avail_in=t.input.length;do{if(0===t.avail_out&&(t.output=new k.Buf8(u),t.next_out=0,t.avail_out=u),d=g.inflate(t,m.Z_NO_FLUSH),d===m.Z_NEED_DICT&&D&&(q="string"==typeof D?l.string2buf(D):"[object ArrayBuffer]"===r.call(D)?new Uint8Array(D):D,d=g.inflateSetDictionary(this.strm,q)),d===m.Z_BUF_ERROR&&!0===B&&(d=m.Z_OK,B=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d),
this.ended=!0,!1;t.next_out&&(0!==t.avail_out&&d!==m.Z_STREAM_END&&(0!==t.avail_in||e!==m.Z_FINISH&&e!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(t.output,t.next_out),n=t.next_out-f,p=l.buf2string(t.output,f),t.next_out=n,t.avail_out=u-n,n&&k.arraySet(t.output,t.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(t.output,t.next_out))));0===t.avail_in&&0===t.avail_out&&(B=!0)}while((0<t.avail_in||0===t.avail_out)&&d!==m.Z_STREAM_END);return d===m.Z_STREAM_END&&(e=m.Z_FINISH),
e===m.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===m.Z_OK):e!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),t.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(b,c,d){b="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if("object"!=typeof d)throw new TypeError(d+"must be non-object");for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}}return b};d.shrinkBuf=function(b,c){return b.length===
@@ -117,77 +117,77 @@ new f.Buf8(256);for(b=0;256>b;b++)l[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=
d?(c[g++]=192|d>>>6,c[g++]=128|63&d):65536>d?(c[g++]=224|d>>>12,c[g++]=128|d>>>6&63,c[g++]=128|63&d):(c[g++]=240|d>>>18,c[g++]=128|d>>>12&63,c[g++]=128|d>>>6&63,c[g++]=128|63&d);return c};d.buf2binstring=function(b){return e(b,b.length)};d.binstring2buf=function(b){for(var c=new f.Buf8(b.length),d=0,e=c.length;d<e;d++)c[d]=b.charCodeAt(d);return c};d.buf2string=function(b,c){var d,f,k,g,m=c||b.length,n=Array(2*m);for(d=f=0;d<m;)if(k=b[d++],128>k)n[f++]=k;else if(g=l[k],4<g)n[f++]=65533,d+=g-1;else{for(k&=
2===g?31:3===g?15:7;1<g&&d<m;)k=k<<6|63&b[d++],g--;1<g?n[f++]=65533:65536>k?n[f++]=k:(k-=65536,n[f++]=55296|k>>10&1023,n[f++]=56320|1023&k)}return e(n,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+l[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){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[k++]|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,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];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&&(v.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 k(b,c){H._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 l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+O,t=n[k+g-1],F=n[k+g];b.prev_length>=b.good_match&&(f>>=
-2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===F&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<r;);if(e=O-(r-k),k=r-O,e>g){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];F=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-S)){v.arraySet(b.window,
-b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=E(c.adler,e,l,g):2===c.state.wrap&&(c.adler=G(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),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<S&&0!==b.strm.avail_in)}function q(b,c){for(var d,e;;){if(b.lookahead<S){if(p(b),b.lookahead<S&&c===B)return Q;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-S&&(b.match_length=n(b,d)),b.match_length>=K)if(e=H._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=H._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<K-1?b.strstart:K-1,c===F?(k(b,!0),0===b.strm.avail_out?Z:R):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:W}function r(b,c){for(var d,e,f;;){if(b.lookahead<S){if(p(b),b.lookahead<S&&c===B)return Q;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-S&&(b.match_length=n(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=H._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&&(k(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=H._tr_tally(b,0,b.window[b.strstart-1]),e&&k(b,!1),
-b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(H._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,c===F?(k(b,!0),0===b.strm.avail_out?Z:R):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:W}function t(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 u(){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=T;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 v.Buf16(2*X);this.dyn_dtree=new v.Buf16(2*(2*L+1));this.bl_tree=new v.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 v.Buf16(fa+1);this.heap=new v.Buf16(2*ca+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*ca+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=ba,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?Y:aa,b.adler=2===c.wrap?0:1,c.last_flush=B,H._tr_init(c),I):e(b,N)}function z(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[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,k,g){if(!b)return N;var l=1;if(c===M&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>D||d!==T||8>f||15<f||0>c||9<c||0>g||g>P)return e(b,N);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+K-1)/K),m.window=new v.Buf8(2*m.w_size),m.head=new v.Buf16(m.hash_size),
-m.prev=new v.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new v.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,z(b)}var A,v=b("../utils/common"),H=b("./trees"),E=b("./adler32"),G=b("./crc32"),C=b("./messages"),B=0,F=4,I=0,N=-2,M=-1,U=1,P=4,ba=2,T=8,D=9,ca=286,L=30,J=19,X=2*ca+1,fa=15,K=3,O=258,S=O+K+1,Y=42,aa=113,Q=1,W=2,Z=3,R=4;A=[new t(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(p(b),0===b.lookahead&&c===B)return Q;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,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-S&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===F?(k(b,!0),0===b.strm.avail_out?Z:R):(b.strstart>b.block_start&&k(b,!1),Q)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32,
-32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return x(b,c,T,15,8,0)};d.deflateInit2=x;d.deflateReset=z;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,I):N};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==F)return e(b,
-0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===Y)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
-8&255)),n.gzhead.hcrc&&(b.adler=G(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=aa)):(q=T+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=aa,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
+0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=D[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&&(v.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 k(b,c){E._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 l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+M,t=n[k+g-1],F=n[k+g];b.prev_length>=b.good_match&&(f>>=
+2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===F&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<r;);if(e=M-(r-k),k=r-M,e>g){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];F=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window,
+b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=G(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+
+b.insert>=J)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+J-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<J)););}while(b.lookahead<T&&0!==b.strm.avail_in)}function q(b,c){for(var d,e;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return Q;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
+J-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=n(b,d)),b.match_length>=J)if(e=E._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-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=E._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<J-1?b.strstart:J-1,c===F?(k(b,!0),0===b.strm.avail_out?ca:R):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:Z}function r(b,c){for(var d,e,f;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return Q;if(0===
+b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-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=J-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d),5>=b.match_length&&(b.strategy===U||b.match_length===J&&4096<b.strstart-b.match_start)&&(b.match_length=J-1)),b.prev_length>=J&&b.match_length<=b.prev_length){f=
+b.strstart+b.lookahead-J;e=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);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+J-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=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=E._tr_tally(b,0,b.window[b.strstart-1]),e&&k(b,!1),
+b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(E._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===F?(k(b,!0),0===b.strm.avail_out?ca:R):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:Z}function t(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 u(){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=S;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 v.Buf16(2*X);this.dyn_dtree=new v.Buf16(2*(2*K+1));this.bl_tree=new v.Buf16(2*(2*da+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 v.Buf16(O+1);this.heap=new v.Buf16(2*W+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*W+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 x(b){var c;
+return b&&b.state?(b.total_in=b.total_out=0,b.data_type=aa,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ba:Y,b.adler=2===c.wrap?0:1,c.last_flush=B,E._tr_init(c),I):e(b,N)}function z(b){var c=x(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
+b.prev_length=J-1,b.match_available=0,b.ins_h=0);return c}function y(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===L&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>C||d!==S||8>f||15<f||0>c||9<c||0>g||g>P)return e(b,N);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+J-1)/J),m.window=new v.Buf8(2*m.w_size),m.head=new v.Buf16(m.hash_size),
+m.prev=new v.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new v.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,z(b)}var A,v=b("../utils/common"),E=b("./trees"),H=b("./adler32"),G=b("./crc32"),D=b("./messages"),B=0,F=4,I=0,N=-2,L=-1,U=1,P=4,aa=2,S=8,C=9,W=286,K=30,da=19,X=2*W+1,O=15,J=3,M=258,T=M+J+1,ba=42,Y=113,Q=1,Z=2,ca=3,R=4;A=[new t(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(p(b),0===b.lookahead&&c===B)return Q;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,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===F?(k(b,!0),0===b.strm.avail_out?ca:R):(b.strstart>b.block_start&&k(b,!1),Q)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,
+32,32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return y(b,c,S,15,8,0)};d.deflateInit2=y;d.deflateReset=z;d.deflateResetKeep=x;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,I):N};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==F)return e(b,
+0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ba)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
+8&255)),n.gzhead.hcrc&&(b.adler=G(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=Y)):(q=S+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=Y,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-
q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=
-1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=aa)):n.status=aa),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)-
-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==F)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==B&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===B){t=Q;break a}break}if(n.match_length=0,u=H._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=Q;break a}}t=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?Z:R):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
-Q:W)}else if(3===n.strategy)a:{var D,y;for(u=n.window;;){if(n.lookahead<=O){if(p(n),n.lookahead<=O&&c===B){t=Q;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(y=n.strstart-1,D=u[y],D===u[++y]&&D===u[++y]&&D===u[++y])){for(d=n.strstart+O;D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&y<d;);n.match_length=O-(d-y);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=K?(t=H._tr_tally(n,1,n.match_length-
-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=H._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=Q;break a}}t=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?Z:R):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?Q:W)}else t=A[n.level].func(n,c);if(t!==Z&&t!==R||(n.status=666),t===Q||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===W&&(1===c?H._tr_align(n):5!==c&&(H._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0===
-n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==F?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==Y&&69!==c&&73!==c&&91!==
-c&&103!==c&&c!==aa&&666!==c?e(b,N):(b.state=null,c===aa?e(b,-3):I)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==Y||d.lookahead))return N;1===g&&(b.adler=E(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>=
-K;){e=d.strstart;k=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(--k);d.strstart=e;d.lookahead=K-1;p(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=m,b.input=n,b.avail_in=l,d.wrap=g,I};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,m,n,p,q,r,t,u,y,z,x,A,v,H,E,G,C,B,F,I,N,M;d=b.state;e=b.next_in;N=b.input;f=e+(b.avail_in-5);m=b.next_out;M=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);q=d.dmax;r=d.wsize;t=d.whave;u=d.wnext;y=d.window;z=d.hold;x=d.bits;A=d.lencode;v=d.distcode;H=(1<<d.lenbits)-
-1;E=(1<<d.distbits)-1;a:do b:for(15>x&&(z+=N[e++]<<x,x+=8,z+=N[e++]<<x,x+=8),G=A[z&H];;){if(C=G>>>24,z>>>=C,x-=C,C=G>>>16&255,0===C)M[m++]=65535&G;else{if(!(16&C)){if(0===(64&C)){G=A[(65535&G)+(z&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}B=65535&G;(C&=15)&&(x<C&&(z+=N[e++]<<x,x+=8),B+=z&(1<<C)-1,z>>>=C,x-=C);15>x&&(z+=N[e++]<<x,x+=8,z+=N[e++]<<x,x+=8);G=v[z&E];c:for(;;){if(C=G>>>24,z>>>=C,x-=C,C=G>>>16&255,!(16&C)){if(0===(64&C)){G=v[(65535&
-G)+(z&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(F=65535&G,C&=15,x<C&&(z+=N[e++]<<x,x+=8,x<C&&(z+=N[e++]<<x,x+=8)),F+=z&(1<<C)-1,F>q){b.msg="invalid distance too far back";d.mode=30;break a}if(z>>>=C,x-=C,C=m-n,F>C){if(C=F-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(G=0,I=y,0===u){if(G+=r-C,C<B){B-=C;do M[m++]=y[G++];while(--C);G=m-F;I=M}}else if(u<C){if(G+=r+u-C,C-=u,C<B){B-=C;do M[m++]=y[G++];while(--C);if(G=0,u<B){C=u;B-=C;do M[m++]=y[G++];
-while(--C);G=m-F;I=M}}}else if(G+=u-C,C<B){B-=C;do M[m++]=y[G++];while(--C);G=m-F;I=M}for(;2<B;)M[m++]=I[G++],M[m++]=I[G++],M[m++]=I[G++],B-=3;B&&(M[m++]=I[G++],1<B&&(M[m++]=I[G++]))}else{G=m-F;do M[m++]=M[G++],M[m++]=M[G++],M[m++]=M[G++],B-=3;while(2<B);B&&(M[m++]=M[G++],1<B&&(M[m++]=M[G++]))}break}}break}while(e<f&&m<p);B=x>>3;e-=B;x-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=z&(1<<x)-1;d.bits=x}},{}],11:[function(b,c,d){function e(b){return(b>>>
+1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=G(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=Y)):n.status=Y),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)-
+(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==F)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==B&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===B){t=Q;break a}break}if(n.match_length=0,u=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=Q;break a}}t=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ca:R):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
+Q:Z)}else if(3===n.strategy)a:{var x,C;for(u=n.window;;){if(n.lookahead<=M){if(p(n),n.lookahead<=M&&c===B){t=Q;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=J&&0<n.strstart&&(C=n.strstart-1,x=u[C],x===u[++C]&&x===u[++C]&&x===u[++C])){for(d=n.strstart+M;x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&x===u[++C]&&C<d;);n.match_length=M-(d-C);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=J?(t=E._tr_tally(n,1,n.match_length-
+J),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=Q;break a}}t=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ca:R):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?Q:Z)}else t=A[n.level].func(n,c);if(t!==ca&&t!==R||(n.status=666),t===Q||t===ca)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Z&&(1===c?E._tr_align(n):5!==c&&(E._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),
+0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==F?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==ba&&69!==c&&73!==c&&
+91!==c&&103!==c&&c!==Y&&666!==c?e(b,N):(b.state=null,c===Y?e(b,-3):I)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==ba||d.lookahead))return N;1===g&&(b.adler=H(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>=
+J;){e=d.strstart;k=d.lookahead-(J-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+J-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=J-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=J-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,I};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,m,n,p,q,r,t,u,x,z,y,A,v,E,H,G,D,B,F,I,N,L;d=b.state;e=b.next_in;N=b.input;f=e+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);q=d.dmax;r=d.wsize;t=d.whave;u=d.wnext;x=d.window;z=d.hold;y=d.bits;A=d.lencode;v=d.distcode;E=(1<<d.lenbits)-
+1;H=(1<<d.distbits)-1;a:do b:for(15>y&&(z+=N[e++]<<y,y+=8,z+=N[e++]<<y,y+=8),G=A[z&E];;){if(D=G>>>24,z>>>=D,y-=D,D=G>>>16&255,0===D)L[m++]=65535&G;else{if(!(16&D)){if(0===(64&D)){G=A[(65535&G)+(z&(1<<D)-1)];continue b}if(32&D){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}B=65535&G;(D&=15)&&(y<D&&(z+=N[e++]<<y,y+=8),B+=z&(1<<D)-1,z>>>=D,y-=D);15>y&&(z+=N[e++]<<y,y+=8,z+=N[e++]<<y,y+=8);G=v[z&H];c:for(;;){if(D=G>>>24,z>>>=D,y-=D,D=G>>>16&255,!(16&D)){if(0===(64&D)){G=v[(65535&
+G)+(z&(1<<D)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(F=65535&G,D&=15,y<D&&(z+=N[e++]<<y,y+=8,y<D&&(z+=N[e++]<<y,y+=8)),F+=z&(1<<D)-1,F>q){b.msg="invalid distance too far back";d.mode=30;break a}if(z>>>=D,y-=D,D=m-n,F>D){if(D=F-D,D>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(G=0,I=x,0===u){if(G+=r-D,D<B){B-=D;do L[m++]=x[G++];while(--D);G=m-F;I=L}}else if(u<D){if(G+=r+u-D,D-=u,D<B){B-=D;do L[m++]=x[G++];while(--D);if(G=0,u<B){D=u;B-=D;do L[m++]=x[G++];
+while(--D);G=m-F;I=L}}}else if(G+=u-D,D<B){B-=D;do L[m++]=x[G++];while(--D);G=m-F;I=L}for(;2<B;)L[m++]=I[G++],L[m++]=I[G++],L[m++]=I[G++],B-=3;B&&(L[m++]=I[G++],1<B&&(L[m++]=I[G++]))}else{G=m-F;do L[m++]=L[G++],L[m++]=L[G++],L[m++]=L[G++],B-=3;while(2<B);B&&(L[m++]=L[G++],1<B&&(L[m++]=L[G++]))}break}}break}while(e<f&&m<p);B=y>>3;e-=B;y-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=z&(1<<y)-1;d.bits=y}},{}],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=v,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(H),c.distcode=c.distdyn=new r.Buf32(E),c.sane=1,c.back=-1,x):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(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)?A:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):A}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==x&&(b.state=null),d):A}function n(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 p,q,r=b("../utils/common"),t=b("./adler32"),u=b("./crc32"),y=b("./inffast"),z=b("./inftrees"),x=0,A=-2,v=1,H=852,E=592,G=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,C,B,D,ca,L,J,H,E,K,O,S,Y,aa,Q,W,Z,R=0,V=new r.Buf8(4),ga=[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 A;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;ca=m;L=C;W=x;a:for(;;)switch(d.mode){case v:if(0===d.wrap){d.mode=13;break}for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(2&d.wrap&&35615===B){d.check=0;V[0]=255&B;V[1]=B>>>8&255;d.check=u(d.check,V,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check";
-d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,Q=(15&B)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.mode=512&B?10:12;D=B=0;break;case 2:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.flags=B,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=B>>8&1);512&d.flags&&
-(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));D=B=0;d.mode=3;case 3:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.head&&(d.head.time=B);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,V[2]=B>>>16&255,V[3]=B>>>24&255,d.check=u(d.check,V,4,0));D=B=0;d.mode=4;case 4:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.head&&(d.head.xflags=255&B,d.head.os=B>>8);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));D=B=0;d.mode=5;case 5:if(1024&d.flags){for(;16>D;){if(0===m)break a;m--;
-B+=f[g++]<<D;D+=8}d.length=B;d.head&&(d.head.extra_len=B);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(J=d.length,J>m&&(J=m),J&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,J,Q)),512&d.flags&&(d.check=u(d.check,f,J,g)),m-=J,g+=J,d.length-=J),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;J=0;do Q=f[g+
-J++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&J<m);if(512&d.flags&&(d.check=u(d.check,f,J,g)),m-=J,g+=J,Q)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;J=0;do Q=f[g+J++],d.head&&Q&&65536>d.length&&(d.head.comment+=String.fromCharCode(Q));while(Q&&J<m);if(512&d.flags&&(d.check=u(d.check,f,J,g)),m-=J,g+=J,Q)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>D;){if(0===m)break a;m--;
-B+=f[g++]<<D;D+=8}if(B!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}D=B=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>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}b.adler=d.check=e(B);D=B=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){B>>>=7&D;D-=7&D;d.mode=27;break}for(;3>D;){if(0===
-m)break a;m--;B+=f[g++]<<D;D+=8}switch(d.last=1&B,B>>>=1,--D,3&B){case 0:d.mode=14;break;case 1:O=d;if(G){p=new r.Buf32(512);q=new r.Buf32(32);for(E=0;144>E;)O.lens[E++]=8;for(;256>E;)O.lens[E++]=9;for(;280>E;)O.lens[E++]=7;for(;288>E;)O.lens[E++]=8;z(1,O.lens,0,288,p,0,O.work,{bits:9});for(E=0;32>E;)O.lens[E++]=5;z(2,O.lens,0,32,q,0,O.work,{bits:5});G=!1}O.lencode=p;O.lenbits=9;O.distcode=q;O.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
-d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if((65535&B)!==(B>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(J=d.length){if(J>m&&(J=m),J>C&&(J=C),0===J)break a;r.arraySet(k,f,g,J,l);m-=J;g+=J;C-=J;l+=J;d.length-=J;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.nlen=(31&B)+257,B>>>=5,D-=5,d.ndist=(31&B)+
-1,B>>>=5,D-=5,d.ncode=(15&B)+4,B>>>=4,D-=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>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.lens[ga[d.have++]]=7&B;B>>>=3;D-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},W=z(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,W){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(;R=d.lencode[B&(1<<d.lenbits)-1],K=R>>>24,O=65535&R,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(16>O)B>>>=K,D-=K,d.lens[d.have++]=O;else{if(16===O){for(E=K+2;D<E;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B>>>=K,D-=K,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];J=3+(3&B);B>>>=2;D-=2}else if(17===O){for(E=K+3;D<E;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=K;D-=K;Q=0;J=3+(7&B);B>>>=3;D-=3}else{for(E=K+7;D<E;){if(0===m)break a;m--;
-B+=f[g++]<<D;D+=8}B>>>=K;D-=K;Q=0;J=11+(127&B);B>>>=7;D-=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++]=Q}}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,Z={bits:d.lenbits},W=z(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,W){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},W=z(2,d.lens,d.nlen,d.ndist,
-d.distcode,0,d.work,Z),d.distbits=Z.bits,W){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<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,L);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;R=d.lencode[B&(1<<d.lenbits)-1],K=R>>>24,E=R>>>16&255,O=65535&R,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(E&&0===(240&E)){S=
-K;Y=E;for(aa=O;R=d.lencode[aa+((B&(1<<S+Y)-1)>>S)],K=R>>>24,E=R>>>16&255,O=65535&R,!(S+K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=S;D-=S;d.back+=S}if(B>>>=K,D-=K,d.back+=K,d.length=O,0===E){d.mode=26;break}if(32&E){d.back=-1;d.mode=12;break}if(64&E){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&E;d.mode=22;case 22:if(d.extra){for(E=d.extra;D<E;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.length+=B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
-23;case 23:for(;R=d.distcode[B&(1<<d.distbits)-1],K=R>>>24,E=R>>>16&255,O=65535&R,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(0===(240&E)){S=K;Y=E;for(aa=O;R=d.distcode[aa+((B&(1<<S+Y)-1)>>S)],K=R>>>24,E=R>>>16&255,O=65535&R,!(S+K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=S;D-=S;d.back+=S}if(B>>>=K,D-=K,d.back+=K,64&E){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&E;d.mode=24;case 24:if(d.extra){for(E=d.extra;D<E;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.offset+=
-B&(1<<d.extra)-1;B>>>=d.extra;D-=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=L-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,H=d.wsize-J):H=d.wnext-J;J>d.length&&(J=d.length);E=d.window}else E=k,H=l-d.offset,J=d.length;J>C&&(J=C);C-=J;d.length-=J;do k[l++]=E[H++];while(--J);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
-k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<<D;D+=8}if(L-=C,b.total_out+=L,d.total+=L,L&&(b.adler=d.check=d.flags?u(d.check,k,L,l-L):t(d.check,k,L,l-L)),L=C,(d.flags?B:e(B))!==d.check){b.msg="incorrect data check";d.mode=30;break}D=B=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}D=B=0}d.mode=29;case 29:W=1;break a;case 30:W=
--3;break a;case 31:return-4;default:return A}return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,(d.wsize||L!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,L-b.avail_out)?(d.mode=31,-4):(ca-=b.avail_in,L-=b.avail_out,b.total_in+=ca,b.total_out+=L,d.total+=L,d.wrap&&L&&(b.adler=d.check=d.flags?u(d.check,k,L,b.next_out-L):t(d.check,k,L,b.next_out-L)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===ca&&0===L||
-4===c)&&W===x&&(W=-5),W)};d.inflateEnd=function(b){if(!b||!b.state)return A;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)?A:(d.head=c,c.done=!1,x)):A};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?A:11===d.mode&&(e=1,e=t(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):A};d.inflateInfo="pako inflate (from Nodeca project)"},
+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=v,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(E),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,y):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(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)?A:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):A}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==y&&(b.state=null),d):A}function n(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 p,q,r=b("../utils/common"),t=b("./adler32"),u=b("./crc32"),x=b("./inffast"),z=b("./inftrees"),y=0,A=-2,v=1,E=852,H=592,G=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,D,B,C,W,K,E,H,O,J,M,T,ba,Y,Q,Z,ca,R=0,V=new r.Buf8(4),ga=[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 A;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;D=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;C=d.bits;W=m;K=D;Z=y;a:for(;;)switch(d.mode){case v:if(0===d.wrap){d.mode=13;break}for(;16>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(2&d.wrap&&35615===B){d.check=0;V[0]=255&B;V[1]=B>>>8&255;d.check=u(d.check,V,2,0);C=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check";
+d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,C-=4,Q=(15&B)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.mode=512&B?10:12;C=B=0;break;case 2:for(;16>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(d.flags=B,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=B>>8&1);512&d.flags&&
+(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));C=B=0;d.mode=3;case 3:for(;32>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}d.head&&(d.head.time=B);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,V[2]=B>>>16&255,V[3]=B>>>24&255,d.check=u(d.check,V,4,0));C=B=0;d.mode=4;case 4:for(;16>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}d.head&&(d.head.xflags=255&B,d.head.os=B>>8);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));C=B=0;d.mode=5;case 5:if(1024&d.flags){for(;16>C;){if(0===m)break a;m--;
+B+=f[g++]<<C;C+=8}d.length=B;d.head&&(d.head.extra_len=B);512&d.flags&&(V[0]=255&B,V[1]=B>>>8&255,d.check=u(d.check,V,2,0));C=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(E=d.length,E>m&&(E=m),E&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,E,Q)),512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,d.length-=E),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;E=0;do Q=f[g+
+E++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&E<m);if(512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,Q)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;E=0;do Q=f[g+E++],d.head&&Q&&65536>d.length&&(d.head.comment+=String.fromCharCode(Q));while(Q&&E<m);if(512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,Q)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>C;){if(0===m)break a;m--;
+B+=f[g++]<<C;C+=8}if(B!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}C=B=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>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}b.adler=d.check=e(B);C=B=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=D,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=C,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){B>>>=7&C;C-=7&C;d.mode=27;break}for(;3>C;){if(0===
+m)break a;m--;B+=f[g++]<<C;C+=8}switch(d.last=1&B,B>>>=1,--C,3&B){case 0:d.mode=14;break;case 1:M=d;if(G){p=new r.Buf32(512);q=new r.Buf32(32);for(O=0;144>O;)M.lens[O++]=8;for(;256>O;)M.lens[O++]=9;for(;280>O;)M.lens[O++]=7;for(;288>O;)M.lens[O++]=8;z(1,M.lens,0,288,p,0,M.work,{bits:9});for(O=0;32>O;)M.lens[O++]=5;z(2,M.lens,0,32,q,0,M.work,{bits:5});G=!1}M.lencode=p;M.lenbits=9;M.distcode=q;M.distbits=5;if(d.mode=20,6===c){B>>>=2;C-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
+d.mode=30}B>>>=2;C-=2;break;case 14:B>>>=7&C;for(C-=7&C;32>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if((65535&B)!==(B>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,C=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(E=d.length){if(E>m&&(E=m),E>D&&(E=D),0===E)break a;r.arraySet(k,f,g,E,l);m-=E;g+=E;D-=E;l+=E;d.length-=E;break}d.mode=12;break;case 17:for(;14>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(d.nlen=(31&B)+257,B>>>=5,C-=5,d.ndist=(31&B)+
+1,B>>>=5,C-=5,d.ncode=(15&B)+4,B>>>=4,C-=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>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}d.lens[ga[d.have++]]=7&B;B>>>=3;C-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,ca={bits:d.lenbits},Z=z(0,d.lens,0,19,d.lencode,0,d.work,ca),d.lenbits=ca.bits,Z){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(;R=d.lencode[B&(1<<d.lenbits)-1],J=R>>>24,M=65535&R,!(J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(16>M)B>>>=J,C-=J,d.lens[d.have++]=M;else{if(16===M){for(O=J+2;C<O;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(B>>>=J,C-=J,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];E=3+(3&B);B>>>=2;C-=2}else if(17===M){for(O=J+3;C<O;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}B>>>=J;C-=J;Q=0;E=3+(7&B);B>>>=3;C-=3}else{for(O=J+7;C<O;){if(0===m)break a;m--;
+B+=f[g++]<<C;C+=8}B>>>=J;C-=J;Q=0;E=11+(127&B);B>>>=7;C-=7}if(d.have+E>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;E--;)d.lens[d.have++]=Q}}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,ca={bits:d.lenbits},Z=z(1,d.lens,0,d.nlen,d.lencode,0,d.work,ca),d.lenbits=ca.bits,Z){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,ca={bits:d.distbits},Z=z(2,d.lens,d.nlen,d.ndist,
+d.distcode,0,d.work,ca),d.distbits=ca.bits,Z){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<=m&&258<=D){b.next_out=l;b.avail_out=D;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=C;x(b,K);l=b.next_out;k=b.output;D=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;C=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;R=d.lencode[B&(1<<d.lenbits)-1],J=R>>>24,O=R>>>16&255,M=65535&R,!(J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(O&&0===(240&
+O)){T=J;ba=O;for(Y=M;R=d.lencode[Y+((B&(1<<T+ba)-1)>>T)],J=R>>>24,O=R>>>16&255,M=65535&R,!(T+J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}B>>>=T;C-=T;d.back+=T}if(B>>>=J,C-=J,d.back+=J,d.length=M,0===O){d.mode=26;break}if(32&O){d.back=-1;d.mode=12;break}if(64&O){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&O;d.mode=22;case 22:if(d.extra){for(O=d.extra;C<O;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}d.length+=B&(1<<d.extra)-1;B>>>=d.extra;C-=d.extra;d.back+=d.extra}d.was=d.length;
+d.mode=23;case 23:for(;R=d.distcode[B&(1<<d.distbits)-1],J=R>>>24,O=R>>>16&255,M=65535&R,!(J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(0===(240&O)){T=J;ba=O;for(Y=M;R=d.distcode[Y+((B&(1<<T+ba)-1)>>T)],J=R>>>24,O=R>>>16&255,M=65535&R,!(T+J<=C);){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}B>>>=T;C-=T;d.back+=T}if(B>>>=J,C-=J,d.back+=J,64&O){b.msg="invalid distance code";d.mode=30;break}d.offset=M;d.extra=15&O;d.mode=24;case 24:if(d.extra){for(O=d.extra;C<O;){if(0===m)break a;m--;B+=f[g++]<<C;C+=
+8}d.offset+=B&(1<<d.extra)-1;B>>>=d.extra;C-=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===D)break a;if(E=K-D,d.offset>E){if(E=d.offset-E,E>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}E>d.wnext?(E-=d.wnext,H=d.wsize-E):H=d.wnext-E;E>d.length&&(E=d.length);O=d.window}else O=k,H=l-d.offset,E=d.length;E>D&&(E=D);D-=E;d.length-=E;do k[l++]=O[H++];while(--E);0===d.length&&(d.mode=21);break;case 26:if(0===
+D)break a;k[l++]=d.length;D--;d.mode=21;break;case 27:if(d.wrap){for(;32>C;){if(0===m)break a;m--;B|=f[g++]<<C;C+=8}if(K-=D,b.total_out+=K,d.total+=K,K&&(b.adler=d.check=d.flags?u(d.check,k,K,l-K):t(d.check,k,K,l-K)),K=D,(d.flags?B:e(B))!==d.check){b.msg="incorrect data check";d.mode=30;break}C=B=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>C;){if(0===m)break a;m--;B+=f[g++]<<C;C+=8}if(B!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}C=B=0}d.mode=29;case 29:Z=1;break a;
+case 30:Z=-3;break a;case 31:return-4;default:return A}return b.next_out=l,b.avail_out=D,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=C,(d.wsize||K!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,K-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,K-=b.avail_out,b.total_in+=W,b.total_out+=K,d.total+=K,d.wrap&&K&&(b.adler=d.check=d.flags?u(d.check,k,K,b.next_out-K):t(d.check,k,K,b.next_out-K)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&
+0===K||4===c)&&Z===y&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return A;var c=b.state;return c.window&&(c.window=null),b.state=null,y};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?A:(d.head=c,c.done=!1,y)):A};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?A:11===d.mode&&(e=1,e=t(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,y)):A};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],k=[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],l=[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,q,r,t,u,y){var m,n,p,v,H,E,G,C,B=y.bits,F,I,N,M,U,P,ba=0,T,D=null,ca=0,L=new e.Buf16(16);v=new e.Buf16(16);var J=null,X=0;for(F=0;15>=F;F++)L[F]=0;for(I=0;I<q;I++)L[c[d+I]]++;M=B;for(N=15;1<=N&&0===L[N];N--);if(M>N&&(M=N),0===N)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B<N&&0===L[B];B++);M<B&&(M=B);for(F=m=1;15>=F;F++)if(m<<=1,m-=L[F],0>m)return-1;if(0<m&&(0===b||1!==N))return-1;v[1]=0;for(F=1;15>F;F++)v[F+1]=v[F]+L[F];
-for(I=0;I<q;I++)0!==c[d+I]&&(u[v[c[d+I]]++]=I);if(0===b?(D=J=u,H=19):1===b?(D=f,ca-=257,J=g,X-=257,H=256):(D=k,J=l,H=-1),T=0,I=0,F=B,v=t,U=M,P=0,p=-1,ba=1<<M,q=ba-1,1===b&&852<ba||2===b&&592<ba)return 1;for(var fa=0;;){fa++;E=F-P;u[I]<H?(G=0,C=u[I]):u[I]>H?(G=J[X+u[I]],C=D[ca+u[I]]):(G=96,C=0);m=1<<F-P;B=n=1<<U;do n-=m,r[v+(T>>P)+n]=E<<24|G<<16|C|0;while(0!==n);for(m=1<<F-1;T&m;)m>>=1;if(0!==m?(T&=m-1,T+=m):T=0,I++,0===--L[F]){if(F===N)break;F=c[d+u[I]]}if(F>M&&(T&q)!==p){0===P&&(P=M);v+=B;U=F-P;
-for(m=1<<U;U+P<N&&(m-=L[U+P],!(0>=m));)U++,m<<=1;if(ba+=1<<U,1===b&&852<ba||2===b&&592<ba)return 1;p=T&q;r[p]=M<<24|U<<16|v-t|0}}return 0!==T&&(r[v+T]=F-P<<24|4194304),y.bits=M,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 k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>ba-d?(b.bi_buf|=c<<b.bi_valid&65535,k(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 m(b,c,d){l(b,d[2*c],d[2*c+1])}function n(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;
-while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(P+1),k=0;for(e=1;e<=P;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;c<I;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<M;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*T]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?k(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 t(b,c,d,e){var f=2*c,k=2*d;
-return b[f]<b[k]||b[f]===b[k]&&e[c]<=e[d]}function u(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&t(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(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,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=aa[f],m(b,k+F+1,c),g=J[k],0!==g&&(f-=Q[k],l(b,f,g)),e--,k=256>e?Y[e]:Y[256+(e>>>7)],m(b,k,d),g=X[k],0!==g&&(e-=
-W[k],l(b,e,g)));while(n<b.last_lit)}m(b,T,c)}function z(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],
-b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,u(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,g=c.dyn_tree,l=c.max_code,r=c.stat_desc.static_tree,t=c.stat_desc.has_stree,D=c.stat_desc.extra_bits,y=c.stat_desc.extra_base,z=c.stat_desc.max_length,x=0;for(e=0;e<=P;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<U;d++)f=b.heap[d],e=g[2*g[2*f+1]+1]+
-1,e>z&&(e=z,x++),g[2*f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=y&&(n=D[f-y]),q=g[2*f],b.opt_len+=q*(e+n),t&&(b.static_len+=q*(r[2*f+1]+n)));if(0!==x){do{for(e=z-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[z]--;x-=2}while(0<x);for(e=z;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function x(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,
-g=c[2*(e+1)+1],++l<m&&f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*D]++):10>=l?b.bl_tree[2*ca]++:b.bl_tree[2*L]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,D,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,ca,b.bl_tree),l(b,n-3,3)):(m(b,L,b.bl_tree),l(b,n-11,7));
-n=0;k=f;0===g?(p=138,q=3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return G;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<F;c++)if(0!==b.dyn_ltree[2*c])return C;return G}function H(b,c,d,e){l(b,(B<<1)+(e?1:0),3);r(b);k(b,d);k(b,~d);E.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var E=b("../utils/common"),G=0,C=1,B=0,F=256,I=F+1+29,N=30,M=19,U=2*I+1,P=15,ba=16,T=256,D=16,ca=
-17,L=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],X=[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],fa=[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],O=Array(2*(I+2));e(O);var S=Array(2*N);e(S);var Y=Array(512);e(Y);var aa=Array(256);e(aa);var Q=Array(29);e(Q);var W=Array(N);e(W);var Z,R,V,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(P+1);for(e=d=0;28>e;e++)for(Q[e]=d,c=0;c<1<<J[e];c++)aa[d++]=e;aa[d-1]=
-e;for(e=d=0;16>e;e++)for(W[e]=d,c=0;c<1<<X[e];c++)Y[d++]=e;for(d>>=7;e<N;e++)for(W[e]=d<<7,c=0;c<1<<X[e]-7;c++)Y[256+d++]=e;for(c=0;c<=P;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,I+1,k);for(c=0;c<N;c++)S[2*c+1]=5,S[2*c]=n(c,5);Z=new f(O,J,F+1,I,P);R=new f(S,X,0,N,P);V=new f([],fa,0,M,7);ga=!0}b.l_desc=new g(b.dyn_ltree,Z);b.d_desc=new g(b.dyn_dtree,R);b.bl_desc=new g(b.bl_tree,V);b.bi_buf=
-0;b.bi_valid=0;q(b)};d._tr_stored_block=H;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=v(b));z(b,b.l_desc);z(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);z(b,b.bl_desc);for(g=M-1;3<=g&&0===b.bl_tree[2*K[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)H(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,O,S);else{l(b,4+(e?
-1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*K[f]+1],3);A(b,b.dyn_ltree,c-1);A(b,b.dyn_dtree,d-1);y(b,b.dyn_ltree,b.dyn_dtree)}q(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]+F+1)]++,b.dyn_dtree[2*(256>c?Y[c]:Y[256+
-(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,T,O);16===b.bi_valid?(k(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=
+25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,q,r,t,u,x){var m,n,p,v,E,H,G,D,B=x.bits,F,I,N,L,U,P,aa=0,S,C=null,W=0,K=new e.Buf16(16);v=new e.Buf16(16);var da=null,X=0;for(F=0;15>=F;F++)K[F]=0;for(I=0;I<q;I++)K[c[d+I]]++;L=B;for(N=15;1<=N&&0===K[N];N--);if(L>N&&(L=N),0===N)return r[t++]=20971520,r[t++]=20971520,x.bits=1,0;for(B=1;B<N&&0===K[B];B++);L<B&&(L=B);for(F=m=1;15>=F;F++)if(m<<=1,m-=K[F],0>m)return-1;if(0<m&&(0===b||1!==N))return-1;v[1]=0;for(F=1;15>F;F++)v[F+1]=v[F]+K[F];
+for(I=0;I<q;I++)0!==c[d+I]&&(u[v[c[d+I]]++]=I);if(0===b?(C=da=u,E=19):1===b?(C=f,W-=257,da=g,X-=257,E=256):(C=k,da=l,E=-1),S=0,I=0,F=B,v=t,U=L,P=0,p=-1,aa=1<<L,q=aa-1,1===b&&852<aa||2===b&&592<aa)return 1;for(var O=0;;){O++;H=F-P;u[I]<E?(G=0,D=u[I]):u[I]>E?(G=da[X+u[I]],D=C[W+u[I]]):(G=96,D=0);m=1<<F-P;B=n=1<<U;do n-=m,r[v+(S>>P)+n]=H<<24|G<<16|D|0;while(0!==n);for(m=1<<F-1;S&m;)m>>=1;if(0!==m?(S&=m-1,S+=m):S=0,I++,0===--K[F]){if(F===N)break;F=c[d+u[I]]}if(F>L&&(S&q)!==p){0===P&&(P=L);v+=B;U=F-P;
+for(m=1<<U;U+P<N&&(m-=K[U+P],!(0>=m));)U++,m<<=1;if(aa+=1<<U,1===b&&852<aa||2===b&&592<aa)return 1;p=S&q;r[p]=L<<24|U<<16|v-t|0}}return 0!==S&&(r[v+S]=F-P<<24|4194304),x.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 k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>aa-d?(b.bi_buf|=c<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=c>>aa-b.bi_valid,b.bi_valid+=d-aa):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function m(b,c,d){l(b,d[2*c],d[2*c+1])}function n(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;
+while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(P+1),k=0;for(e=1;e<=P;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;c<I;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<L;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*S]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?k(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 t(b,c,d,e){var f=2*c,k=2*d;
+return b[f]<b[k]||b[f]===b[k]&&e[c]<=e[d]}function u(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&t(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function x(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=Y[f],m(b,k+F+1,c),g=da[k],0!==g&&(f-=Q[k],l(b,f,g)),e--,k=256>e?ba[e]:ba[256+(e>>>7)],m(b,k,d),g=X[k],0!==g&&
+(e-=Z[k],l(b,e,g)));while(n<b.last_lit)}m(b,S,c)}function z(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],
+b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,u(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,g=c.dyn_tree,l=c.max_code,r=c.stat_desc.static_tree,t=c.stat_desc.has_stree,x=c.stat_desc.extra_bits,C=c.stat_desc.extra_base,z=c.stat_desc.max_length,v=0;for(e=0;e<=P;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<U;d++)f=b.heap[d],e=g[2*g[2*f+1]+1]+
+1,e>z&&(e=z,v++),g[2*f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=C&&(n=x[f-C]),q=g[2*f],b.opt_len+=q*(e+n),t&&(b.static_len+=q*(r[2*f+1]+n)));if(0!==v){do{for(e=z-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[z]--;v-=2}while(0<v);for(e=z;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function y(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,
+g=c[2*(e+1)+1],++l<m&&f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*C]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*K]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,C,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,K,b.bl_tree),l(b,n-11,7));n=
+0;k=f;0===g?(p=138,q=3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return G;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(c=32;c<F;c++)if(0!==b.dyn_ltree[2*c])return D;return G}function E(b,c,d,e){l(b,(B<<1)+(e?1:0),3);r(b);k(b,d);k(b,~d);H.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var H=b("../utils/common"),G=0,D=1,B=0,F=256,I=F+1+29,N=30,L=19,U=2*I+1,P=15,aa=16,S=256,C=16,W=17,
+K=18,da=[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],X=[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],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=Array(2*(I+2));e(M);var T=Array(2*N);e(T);var ba=Array(512);e(ba);var Y=Array(256);e(Y);var Q=Array(29);e(Q);var Z=Array(N);e(Z);var ca,R,V,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(P+1);for(e=d=0;28>e;e++)for(Q[e]=d,c=0;c<1<<da[e];c++)Y[d++]=e;Y[d-1]=e;
+for(e=d=0;16>e;e++)for(Z[e]=d,c=0;c<1<<X[e];c++)ba[d++]=e;for(d>>=7;e<N;e++)for(Z[e]=d<<7,c=0;c<1<<X[e]-7;c++)ba[256+d++]=e;for(c=0;c<=P;c++)k[c]=0;for(c=0;143>=c;)M[2*c+1]=8,c++,k[8]++;for(;255>=c;)M[2*c+1]=9,c++,k[9]++;for(;279>=c;)M[2*c+1]=7,c++,k[7]++;for(;287>=c;)M[2*c+1]=8,c++,k[8]++;p(M,I+1,k);for(c=0;c<N;c++)T[2*c+1]=5,T[2*c]=n(c,5);ca=new f(M,da,F+1,I,P);R=new f(T,X,0,N,P);V=new f([],O,0,L,7);ga=!0}b.l_desc=new g(b.dyn_ltree,ca);b.d_desc=new g(b.dyn_dtree,R);b.bl_desc=new g(b.bl_tree,V);
+b.bi_buf=0;b.bi_valid=0;q(b)};d._tr_stored_block=E;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=v(b));z(b,b.l_desc);z(b,b.d_desc);y(b,b.dyn_ltree,b.l_desc.max_code);y(b,b.dyn_dtree,b.d_desc.max_code);z(b,b.bl_desc);for(g=L-1;3<=g&&0===b.bl_tree[2*J[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)E(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),x(b,M,T);else{l(b,
+4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*J[f]+1],3);A(b,b.dyn_ltree,c-1);A(b,b.dyn_dtree,d-1);x(b,b.dyn_ltree,b.dyn_dtree)}q(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*(Y[d]+F+1)]++,b.dyn_dtree[2*(256>c?ba[c]:ba[256+
+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,S,M);16===b.bi_valid?(k(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}]},{},[])("/")});window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";
window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
@@ -253,8 +253,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,k,l){k-=a;l-=b;if(0===c||0===d)return q;
-c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),q=Math.sin(e*Math.PI/180);e=p*m+q*n;var m=-1*q*m+p*n,n=e*e,r=m*m,t=c*c,u=d*d,y=n/t+r/u;1<y?(c*=Math.sqrt(y),d*=Math.sqrt(y),f=0):(y=1,f===g&&(y=-1),f=y*Math.sqrt((t*u-t*r-u*n)/(t*r+u*n)));n=f*c*m/d;r=-1*f*d*e/c;k=p*n-q*r+k/2;l=q*n+p*r+l/2;t=Math.atan2((m-r)/d,(e-n)/c)-Math.atan2(0,1);f=0<=t?t:2*Math.PI+t;t=Math.atan2((-m-r)/d,(-e-n)/c)-Math.atan2((m-r)/d,(e-n)/c);e=0<=t?t:2*Math.PI+t;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;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=q;d*=q;for(var z=Math.cos(f),x=Math.sin(f),r=-m*(n*x+d*z),t=-m*(c*x-p*z),q=[],A=0;A<g;++A){f+=e;var z=Math.cos(f),x=Math.sin(f),u=n*z-d*x+k,y=c*z+p*x+l,v=-m*(n*x+d*z),z=-m*(c*x-p*z),x=6*A;q[x]=Number(r+a);q[x+1]=Number(t+b);q[x+2]=Number(u-v+a);q[x+3]=Number(y-z+b);q[x+4]=Number(u+a);q[x+5]=Number(y+b);r=u+v;t=y+z}return q},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 m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),q=Math.sin(e*Math.PI/180);e=p*m+q*n;var m=-1*q*m+p*n,n=e*e,r=m*m,t=c*c,u=d*d,x=n/t+r/u;1<x?(c*=Math.sqrt(x),d*=Math.sqrt(x),f=0):(x=1,f===g&&(x=-1),f=x*Math.sqrt((t*u-t*r-u*n)/(t*r+u*n)));n=f*c*m/d;r=-1*f*d*e/c;k=p*n-q*r+k/2;l=q*n+p*r+l/2;t=Math.atan2((m-r)/d,(e-n)/c)-Math.atan2(0,1);f=0<=t?t:2*Math.PI+t;t=Math.atan2((-m-r)/d,(-e-n)/c)-Math.atan2((m-r)/d,(e-n)/c);e=0<=t?t:2*Math.PI+t;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;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=q;d*=q;for(var z=Math.cos(f),y=Math.sin(f),r=-m*(n*y+d*z),t=-m*(c*y-p*z),q=[],A=0;A<g;++A){f+=e;var z=Math.cos(f),y=Math.sin(f),u=n*z-d*y+k,x=c*z+p*y+l,v=-m*(n*y+d*z),z=-m*(c*y-p*z),y=6*A;q[y]=Number(r+a);q[y+1]=Number(t+b);q[y+2]=Number(u-v+a);q[y+3]=Number(x-z+b);q[y+4]=Number(u+a);q[y+5]=Number(x+b);r=u+v;t=x+z}return q},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;
@@ -527,13 +527,13 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&n
mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxConstants.ALIGN_MIDDLE?g-=d/2:f==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=k&&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!=m&&(e+="rotate("+m+","+-l+","+-g+")");
n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0<d&&(t+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var t=k&&0<c?t+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var y=this.createElement("foreignObject");y.setAttribute("style","overflow:visible;");y.setAttribute("pointer-events","all");t=this.createDiv(e,f,g,t,m);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(y);this.root.appendChild(u);var z,x;q=z=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
-document?(t.style.visibility="hidden",document.body.appendChild(t)):y.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==y&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(H=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<
-A.offsetWidth&&(t.style.whiteSpace=H));z=v+z-1;k&&"fill"!=m&&"width"!=m&&(n&&(z=Math.min(z,c)),t.style.width=z+"px");z=A.offsetWidth;x=A.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=z,u.mxCachedFinalOffsetHeight=x);x-=q;t.parentNode!=y&&(y.appendChild(t),t.style.visibility="")}else{A=document.createElement("div");A.style.cssText=t.getAttribute("style");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="absolute";A.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;A.appendChild(x);document.body.appendChild(A);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(z+=2,q+=2);if(k&&0<c){var v=x.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var H=A.style.whiteSpace;x.style.whiteSpace="nowrap";v<x.offsetWidth&&(A.style.whiteSpace=H)}n&&(v=Math.min(v,c));A.style.width=v+"px";
-z=x.offsetWidth+z+0;x=x.offsetHeight+q;A.style.display="inline-block";A.style.position="";A.style.visibility="";A.style.width=z+"px";t.setAttribute("style",A.style.cssText)}else z=x.offsetWidth+z,x=x.offsetHeight+q;A.parentNode.removeChild(A);y.appendChild(t)}n&&(x=Math.min(x,d),z=Math.min(z,c));"width"==m?d=x:"fill"!=m&&(c=z,d=x);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
-(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;A=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(A+="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!=p&&(A+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+A);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,k,l,m,n,p),null!=a&&(y.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(y),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
+Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var x=this.createElement("foreignObject");x.setAttribute("style","overflow:visible;");x.setAttribute("pointer-events","all");t=this.createDiv(e,f,g,t,m);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(x);this.root.appendChild(u);var z,y;q=z=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
+document?(t.style.visibility="hidden",document.body.appendChild(t)):x.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==x&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(E=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<
+A.offsetWidth&&(t.style.whiteSpace=E));z=v+z-1;k&&"fill"!=m&&"width"!=m&&(n&&(z=Math.min(z,c)),t.style.width=z+"px");z=A.offsetWidth;y=A.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=z,u.mxCachedFinalOffsetHeight=y);y-=q;t.parentNode!=x&&(x.appendChild(t),t.style.visibility="")}else{A=document.createElement("div");A.style.cssText=t.getAttribute("style");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="absolute";A.style.visibility="hidden";y=document.createElement("div");
+y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.wordWrap=mxConstants.WORD_WRAP;y.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;A.appendChild(y);document.body.appendChild(A);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(z+=2,q+=2);if(k&&0<c){var v=y.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var E=A.style.whiteSpace;y.style.whiteSpace="nowrap";v<y.offsetWidth&&(A.style.whiteSpace=E)}n&&(v=Math.min(v,c));A.style.width=v+"px";
+z=y.offsetWidth+z+0;y=y.offsetHeight+q;A.style.display="inline-block";A.style.position="";A.style.visibility="";A.style.width=z+"px";t.setAttribute("style",A.style.cssText)}else z=y.offsetWidth+z,y=y.offsetHeight+q;A.parentNode.removeChild(A);x.appendChild(t)}n&&(y=Math.min(y,d),z=Math.min(z,c));"width"==m?d=y:"fill"!=m&&(c=z,d=y);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;A=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(A+="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!=p&&(A+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+A);x.setAttribute("width",
+Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
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,k,l,m,n,p){n=null!=n?n:0;k=this.state;var q=k.fontSize,r=this.createElement("g"),t=k.transform||"";this.updateFont(r);0!=n&&(t+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&r.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),mxClient.IS_CHROME_APP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"):(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&r.setAttribute("text-anchor",
@@ -565,23 +565,23 @@ 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,k,l,m,n,p,q){if(this.textEnabled&&null!=e){var r=this.state;if("html"==l){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"!=m&&g==mxConstants.ALIGN_TOP&&--b);l=8!=document.documentMode||mxClient.IS_EM?this.createElement("div"):this.createVmlElement("group");l.style.position="absolute";l.style.display="inline";l.style.left=
-this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=r.scale;var t=this.createElement("div");t.style.position="relative";t.style.display="inline";var u=mxUtils.getAlignmentAsPoint(f,g),y=u.x,u=u.y;e=this.createDiv(e,f,g,m);f=this.createElement("div");null!=q&&e.setAttribute("dir",q);if(k&&0<c){if(n||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var z=e;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&
+this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=r.scale;var t=this.createElement("div");t.style.position="relative";t.style.display="inline";var u=mxUtils.getAlignmentAsPoint(f,g),x=u.x,u=u.y;e=this.createDiv(e,f,g,m);f=this.createElement("div");null!=q&&e.setAttribute("dir",q);if(k&&0<c){if(n||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var z=e;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&
(z.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";p=r.rotation+(p||0);this.rotateHtml&&0!=p?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?l.appendChild(f):(t.appendChild(f),l.appendChild(t))):8!=document.documentMode||mxClient.IS_EM?(e.style.display="inline",l.appendChild(e)):(t.appendChild(e),l.appendChild(t));"DIV"!=this.root.nodeName?(q=this.createVmlElement("rect"),q.stroked="false",q.filled="false",
q.appendChild(l),this.root.appendChild(q)):this.root.appendChild(l);n?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==m?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==m&&(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!=p){z=Math.PI/180*p;p=parseFloat(parseFloat(Math.cos(z)).toFixed(8));
-q=parseFloat(parseFloat(Math.sin(-z)).toFixed(8));z%=2*Math.PI;0>z&&(z+=2*Math.PI);z%=Math.PI;z>Math.PI/2&&(z=Math.PI-z);g=Math.cos(z);var x=Math.sin(z);8!=document.documentMode||mxClient.IS_EM||(e.style.display="inline-block",f.style.display="inline-block",t.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);t=e;null!=t.firstChild&&"DIV"==t.firstChild.nodeName&&(t=t.firstChild);z=t.offsetWidth+3;t=t.offsetHeight;n?(c=Math.min(c,z),t=
-Math.min(t,d)):c=z;k&&(e.style.width=c+"px");mxClient.IS_QUIRKS&&(n||"width"==m)&&t>d&&(t=d,e.style.height=t+"px");d=t;n=(d-d*g+c*-x)/2-q*c*(y+.5)+p*d*(u+.5);k=(c-c*g+d*-x)/2+p*c*(y+.5)+q*d*(u+.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-c/2)*r.scale)+"px",m.style.top=this.format(b+(n-d/2)*r.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(r=8!=document.documentMode||
+q=parseFloat(parseFloat(Math.sin(-z)).toFixed(8));z%=2*Math.PI;0>z&&(z+=2*Math.PI);z%=Math.PI;z>Math.PI/2&&(z=Math.PI-z);g=Math.cos(z);var y=Math.sin(z);8!=document.documentMode||mxClient.IS_EM||(e.style.display="inline-block",f.style.display="inline-block",t.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);t=e;null!=t.firstChild&&"DIV"==t.firstChild.nodeName&&(t=t.firstChild);z=t.offsetWidth+3;t=t.offsetHeight;n?(c=Math.min(c,z),t=
+Math.min(t,d)):c=z;k&&(e.style.width=c+"px");mxClient.IS_QUIRKS&&(n||"width"==m)&&t>d&&(t=d,e.style.height=t+"px");d=t;n=(d-d*g+c*-y)/2-q*c*(x+.5)+p*d*(u+.5);k=(c-c*g+d*-y)/2+p*c*(x+.5)+q*d*(u+.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-c/2)*r.scale)+"px",m.style.top=this.format(b+(n-d/2)*r.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(r=8!=document.documentMode||
mxClient.IS_EM?r.scale:1,l.style.left=this.format(a+(k-c/2)*r)+"px",l.style.top=this.format(b+(n-d/2)*r)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+p+", M12="+q+", M21="+-q+", M22="+p+", 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&&(l.style.filter="alpha(opacity="+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,t=e.offsetHeight,mxClient.IS_QUIRKS&&n&&t>d&&(t=d,e.style.height=t+"px"),d=t,e.style.visibility="",r.appendChild(e),l.style.left=this.format(a+c*y*this.state.scale)+"px",l.style.top=this.format(b+d*u*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),t.style.left=100*y+"%",t.style.top=
+"top",1>this.state.alpha&&(l.style.filter="alpha(opacity="+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,t=e.offsetHeight,mxClient.IS_QUIRKS&&n&&t>d&&(t=d,e.style.height=t+"px"),d=t,e.style.visibility="",r.appendChild(e),l.style.left=this.format(a+c*x*this.state.scale)+"px",l.style.top=this.format(b+d*u*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),t.style.left=100*x+"%",t.style.top=
100*u+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,k,l,m,n,p,q)}};
mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p,q){k=this.state;a=(a+k.dx)*k.scale;b=(b+k.dy)*k.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.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=k.fontFamily;d.string=e;d.on="true";f=k.fontSize*k.scale/this.vmlScale;d.style.fontSize=f+"px";(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");k=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;f=e=0;
g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=Math.PI/180*p,e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-G)<z?(l=b-a.getCenterY(),z=Math.abs(b-G),c=!0):Math.abs(b-H)<z?(l=b-a.y,z=Math.abs(b-H),c=!0):Math.abs(b-E)<z&&(l=b-a.y-a.height,z=Math.abs(b-E),c=!0);c&&(r=C,t=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||c},e=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-v)<y?(k=b-a.getCenterX(),y=Math.abs(b-v),d=!0):Math.abs(b-x)<y?(k=b-a.x,y=Math.abs(b-x),d=!0):Math.abs(b-A)<y&&(k=b-a.x-a.width,y=Math.abs(b-A),d=!0);d&&(n=c,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||d},f=this.graph.getView().translate,g=this.graph.getView().scale,k=b.x,l=b.y,m=!1,n=null,p=null,q=!1,r=null,t=null,u=this.getGuideTolerance(),y=u,z=u,u=a.clone();u.x+=b.x;u.y+=b.y;var x=u.x,A=u.x+u.width,v=u.getCenterX(),H=u.y,E=u.y+u.height,G=u.getCenterY();for(b=0;b<this.states.length;b++){var C=this.states[b];null!=C&&(this.horizontal&&(e.call(this,C.getCenterX(),C),e.call(this,C.x,
-C),e.call(this,C.x+C.width,C)),this.vertical&&(d.call(this,C.getCenterY(),C),d.call(this,C.y,C),d.call(this,C.y+C.height,C)))}c&&(m||(c=a.x-(this.graph.snap(a.x/g-f.x)+f.x)*g,k=this.graph.snap(k/g)*g-c),q||(f=a.y-(this.graph.snap(a.y/g-f.y)+f.y)*g,l=this.graph.snap(l/g)*g-f));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-G)<z?(l=b-a.getCenterY(),z=Math.abs(b-G),c=!0):Math.abs(b-E)<z?(l=b-a.y,z=Math.abs(b-E),c=!0):Math.abs(b-H)<z&&(l=b-a.y-a.height,z=Math.abs(b-H),c=!0);c&&(r=D,t=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||c},e=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-v)<x?(k=b-a.getCenterX(),x=Math.abs(b-v),d=!0):Math.abs(b-y)<x?(k=b-a.x,x=Math.abs(b-y),d=!0):Math.abs(b-A)<x&&(k=b-a.x-a.width,x=Math.abs(b-A),d=!0);d&&(n=c,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||d},f=this.graph.getView().translate,g=this.graph.getView().scale,k=b.x,l=b.y,m=!1,n=null,p=null,q=!1,r=null,t=null,u=this.getGuideTolerance(),x=u,z=u,u=a.clone();u.x+=b.x;u.y+=b.y;var y=u.x,A=u.x+u.width,v=u.getCenterX(),E=u.y,H=u.y+u.height,G=u.getCenterY();for(b=0;b<this.states.length;b++){var D=this.states[b];null!=D&&(this.horizontal&&(e.call(this,D.getCenterX(),D),e.call(this,D.x,
+D),e.call(this,D.x+D.width,D)),this.vertical&&(d.call(this,D.getCenterY(),D),d.call(this,D.y,D),d.call(this,D.y+D.height,D)))}c&&(m||(c=a.x-(this.graph.snap(a.x/g-f.x)+f.x)*g,k=this.graph.snap(k/g)*g-c),q||(f=a.y-(this.graph.snap(a.y/g-f.y)+f.y)*g,l=this.graph.snap(l/g)*g-f));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
[new mxPoint(p,minY),new mxPoint(p,maxY)]:[new mxPoint(p,-this.graph.panDy),new mxPoint(p,g.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(n,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";q||null==this.guideY?null!=this.guideY&&(null!=r&&null!=a&&(minX=Math.min(a.x+k-this.graph.panDx,r.x),maxX=Math.max(a.x+a.width+k-this.graph.panDx,r.x+r.width)),this.guideY.points=null!=minX&&null!=maxX?[new mxPoint(minX,t),
new mxPoint(maxX,t)]:[new mxPoint(-this.graph.panDx,t),new mxPoint(g.scrollWidth-3-this.graph.panDx,t)],this.guideY.stroke=this.getGuideColor(r,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden";b=new mxPoint(k,l)}return b};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;
@@ -657,19 +657,19 @@ mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2,k=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,k=f.y-e.y,l=Math.sqrt(g*g+k*k),m=l-2*c-mxConstants.ARROW_SIZE,g=g/l,k=k/l,l=d*k/3,d=-d*g/3,n=e.x-l/2+c*g,e=e.y-d/2+c*k,p=n+l,q=e+d,r=p+m*g,m=q+m*k,t=r+l,u=m+d,y=t-3*l,z=u-3*d;a.begin();a.moveTo(n,e);a.lineTo(p,q);a.lineTo(r,m);a.lineTo(t,u);a.lineTo(f.x-c*g,f.y-c*k);a.lineTo(y,z);a.lineTo(y+l,z+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,k=f.y-e.y,l=Math.sqrt(g*g+k*k),m=l-2*c-mxConstants.ARROW_SIZE,g=g/l,k=k/l,l=d*k/3,d=-d*g/3,n=e.x-l/2+c*g,e=e.y-d/2+c*k,p=n+l,q=e+d,r=p+m*g,m=q+m*k,t=r+l,u=m+d,x=t-3*l,z=u-3*d;a.begin();a.moveTo(n,e);a.lineTo(p,q);a.lineTo(r,m);a.lineTo(t,u);a.lineTo(f.x-c*g,f.y-c*k);a.lineTo(x,z);a.lineTo(x+l,z+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(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),q=b[b.length-1],r=1;r<b.length-1&&b[r].x==
-b[0].x&&b[r].y==b[0].y;)r++;var t=b[r].x-b[0].x,r=b[r].y-b[0].y,u=Math.sqrt(t*t+r*r);if(0!=u){var y=t/u,z,x=y,A=r/u,v,H=A,u=f*A,E=-f*y,G=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();t=y;r=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,y,A,n,d,f,m,!0);else{z=b[0].x+u/2+m*y;v=b[0].y+E/2+m*A;var C=b[0].x-u/2+m*y,B=b[0].y-E/2+m*A;g?(a.moveTo(z,v),G.push(function(){a.lineTo(C,B)})):(a.moveTo(C,B),a.lineTo(z,v))}for(var F=v=z=0,u=0;u<b.length-2;u++)if(E=mxUtils.relativeCcw(b[u].x,
-b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),z=b[u+2].x-b[u+1].x,v=b[u+2].y-b[u+1].y,F=Math.sqrt(z*z+v*v),0!=F&&(x=z/F,H=v/F,tmp=Math.max(Math.sqrt((y*x+A*H+1)/2),.04),z=y+x,v=A+H,F=Math.sqrt(z*z+v*v),0!=F)){z/=F;v/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),F=0!=E&&p?Math.max(.1,F):Math.max(tmp,.06),I=b[u+1].x+v*f/2/F,N=b[u+1].y-z*f/2/F;v=b[u+1].x-v*f/2/F;z=b[u+1].y+z*f/2/F;0!=E&&p?-1==E?(E=v+H*f,F=z-x*f,a.lineTo(v+A*f,z-y*f),a.quadTo(I,N,E,F),function(b,c){G.push(function(){a.lineTo(b,
-c)})}(v,z)):(a.lineTo(I,N),function(b,c){var d=I-A*f,e=N+y*f,k=I-H*f,g=N+x*f;G.push(function(){a.quadTo(b,c,d,e)});G.push(function(){a.lineTo(k,g)})}(v,z)):(a.lineTo(I,N),function(b,c){G.push(function(){a.lineTo(b,c)})}(v,z));y=x;A=H}u=f*H;E=-f*x;if(l&&!g)this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*x+u/2,q.y-m*H+E/2);var M=q.x-m*x-u/2,U=q.y-m*H-E/2;g?(a.moveTo(M,U),G.splice(0,0,function(){a.moveTo(M,U)})):a.lineTo(M,U)}for(u=G.length-1;0<=u;u--)G[u]();g?(a.end(),a.stroke()):(a.close(),
-a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,t,r,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!0),a.stroke(),a.end()))}};
+b[0].x&&b[r].y==b[0].y;)r++;var t=b[r].x-b[0].x,r=b[r].y-b[0].y,u=Math.sqrt(t*t+r*r);if(0!=u){var x=t/u,z,y=x,A=r/u,v,E=A,u=f*A,H=-f*x,G=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();t=x;r=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,x,A,n,d,f,m,!0);else{z=b[0].x+u/2+m*x;v=b[0].y+H/2+m*A;var D=b[0].x-u/2+m*x,B=b[0].y-H/2+m*A;g?(a.moveTo(z,v),G.push(function(){a.lineTo(D,B)})):(a.moveTo(D,B),a.lineTo(z,v))}for(var F=v=z=0,u=0;u<b.length-2;u++)if(H=mxUtils.relativeCcw(b[u].x,
+b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),z=b[u+2].x-b[u+1].x,v=b[u+2].y-b[u+1].y,F=Math.sqrt(z*z+v*v),0!=F&&(y=z/F,E=v/F,tmp=Math.max(Math.sqrt((x*y+A*E+1)/2),.04),z=x+y,v=A+E,F=Math.sqrt(z*z+v*v),0!=F)){z/=F;v/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),F=0!=H&&p?Math.max(.1,F):Math.max(tmp,.06),I=b[u+1].x+v*f/2/F,N=b[u+1].y-z*f/2/F;v=b[u+1].x-v*f/2/F;z=b[u+1].y+z*f/2/F;0!=H&&p?-1==H?(H=v+E*f,F=z-y*f,a.lineTo(v+A*f,z-x*f),a.quadTo(I,N,H,F),function(b,c){G.push(function(){a.lineTo(b,
+c)})}(v,z)):(a.lineTo(I,N),function(b,c){var d=I-A*f,e=N+x*f,k=I-E*f,g=N+y*f;G.push(function(){a.quadTo(b,c,d,e)});G.push(function(){a.lineTo(k,g)})}(v,z)):(a.lineTo(I,N),function(b,c){G.push(function(){a.lineTo(b,c)})}(v,z));x=y;A=E}u=f*E;H=-f*y;if(l&&!g)this.paintMarker(a,q.x,q.y,-x,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*y+u/2,q.y-m*E+H/2);var L=q.x-m*y-u/2,U=q.y-m*E-H/2;g?(a.moveTo(L,U),G.splice(0,0,function(){a.moveTo(L,U)})):a.lineTo(L,U)}for(u=G.length-1;0<=u;u--)G[u]();g?(a.end(),a.stroke()):(a.close(),
+a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,t,r,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-x,-A,c,e,f,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+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,k,l,m,n,p,q,r,t,u,y,z,x,A,v){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!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
-this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=r?r:!0;this.background=t;this.border=u;this.wrap=null!=y?y:!1;this.clipped=null!=z?z:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=A?A:0;this.textDirection=v;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,k,l,m,n,p,q,r,t,u,x,z,y,A,v){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!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
+this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=r?r:!0;this.background=t;this.border=u;this.wrap=null!=x?x:!1;this.clipped=null!=z?z:!1;this.overflow=null!=y?y:"visible";this.labelPadding=null!=A?A:0;this.textDirection=v;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 k=mxUtils.isNode(this.value)||
@@ -760,7 +760,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 k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),k=1==mxUtils.getValue(k,
mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(l=k?Math.min(l,b.height):Math.min(l,b.width));c==k&&(e-=l);k?g+=l:f+=l}d.beginUpdate();try{for(var l=0,k=null,m=0,n=null,p=d.getChildCount(a),q=0;q<p;q++){var r=d.getChildAt(a,q);if(!this.isVertexIgnored(r)&&this.isVertexMovable(r)){var t=d.getGeometry(r);if(null!=t){t=t.clone();null!=this.wrap&&null!=k&&(c&&k.x+k.width+t.width+2*this.spacing>this.wrap||!c&&k.y+k.height+t.height+2*this.spacing>this.wrap)&&(k=null,c?g+=l+this.spacing:f+=l+this.spacing,l=0);
-var l=Math.max(l,c?t.height:t.width),u=0;if(!this.borderCollapse)var y=this.graph.getCellStyle(r),u=mxUtils.getNumber(y,mxConstants.STYLE_STROKEWIDTH,1);null!=k?c?t.x=m+this.spacing+Math.floor(u/2):t.y=m+this.spacing+Math.floor(u/2):this.keepFirstLocation||(c?t.x=f:t.y=g);c?t.y=g:t.x=f;this.fill&&null!=e&&(c?t.height=e:t.width=e);this.setChildGeometry(r,t);n=r;k=t;m=c?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+var l=Math.max(l,c?t.height:t.width),u=0;if(!this.borderCollapse)var x=this.graph.getCellStyle(r),u=mxUtils.getNumber(x,mxConstants.STYLE_STROKEWIDTH,1);null!=k?c?t.x=m+this.spacing+Math.floor(u/2):t.y=m+this.spacing+Math.floor(u/2):this.keepFirstLocation||(c?t.x=f:t.y=g);c?t.y=g:t.x=f;this.fill&&null!=e&&(c?t.height=e:t.width=e);this.setChildGeometry(r,t);n=r;k=t;m=c?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
b,k):this.resizeLast&&null!=b&&null!=k&&null!=n&&(c?k.width=b.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=b.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(n,k))}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};
@@ -863,9 +863,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.length;g++)k=f[g],k.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 k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(a,b){return a-b});f[l]=m}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;l=2*f-1;--f;e=[];for(g=0;g<l;++g)e[g]=0;for(g=0;g<d.length;g++)for(l=d[g]+f,++e[l];0<
l;)l%2&&(c+=e[l+1]),l=l-1>>1,++e[l];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],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,q=null,r,t,u=null,y=null,z,x=null,l=0;l<g.length-1;l++){if(0==l){z=k[l];m=z.getNextLayerConnectedCells(f);n=z.getPreviousLayerConnectedCells(f);r=[];t=[];for(var A=0;A<m.length;A++)r[A]=m[A].getGeneralPurposeVariable(f+1);for(A=
-0;A<n.length;A++)t[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,r=u,t=y,z=x;x=k[l+1];p=x.getNextLayerConnectedCells(f);q=x.getPreviousLayerConnectedCells(f);u=[];y=[];for(A=0;A<p.length;A++)u[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)y[A]=q[A].getGeneralPurposeVariable(f-1);for(var v=0,H=0,A=0;A<r.length;A++)for(var E=0;E<u.length;E++)r[A]>u[E]&&v++,r[A]<u[E]&&H++;for(A=0;A<t.length;A++)for(E=0;E<y.length;E++)t[A]>y[E]&&v++,t[A]<y[E]&&H++;if(H<v||H==v&&e)p=z.getGeneralPurposeVariable(f),
-z.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,p),p=m,q=n,u=r,y=t,x=z,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],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,q=null,r,t,u=null,x=null,z,y=null,l=0;l<g.length-1;l++){if(0==l){z=k[l];m=z.getNextLayerConnectedCells(f);n=z.getPreviousLayerConnectedCells(f);r=[];t=[];for(var A=0;A<m.length;A++)r[A]=m[A].getGeneralPurposeVariable(f+1);for(A=
+0;A<n.length;A++)t[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,r=u,t=x,z=y;y=k[l+1];p=y.getNextLayerConnectedCells(f);q=y.getPreviousLayerConnectedCells(f);u=[];x=[];for(A=0;A<p.length;A++)u[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)x[A]=q[A].getGeneralPurposeVariable(f-1);for(var v=0,E=0,A=0;A<r.length;A++)for(var H=0;H<u.length;H++)r[A]>u[H]&&v++,r[A]<u[H]&&E++;for(A=0;A<t.length;A++)for(H=0;H<x.length;H++)t[A]>x[H]&&v++,t[A]<x[H]&&E++;if(E<v||E==v&&e)p=z.getGeneralPurposeVariable(f),
+z.setGeneralPurposeVariable(f,y.getGeneralPurposeVariable(f)),y.setGeneralPurposeVariable(f,p),p=m,q=n,u=r,x=t,y=z,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],k=new MedianCellSorter;k.cell=g;var l;l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):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;
@@ -878,8 +878,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],k=new WeightedCellSorter(g,e);k.rankIndex=f;k.visited=!0;b.push(k);c.put(g,k)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,l=g.weightedValue,m=parseInt(g.rankIndex),k=e.getNextLayerConnectedCells(l),n=e.getPreviousLayerConnectedCells(l),p=k.length,q=n.length,r=this.medianXValue(k,l+1),t=this.medianXValue(n,
-l-1),u=p+q,y=e.getGeneralPurposeVariable(l),z=y;0<u&&(z=(r*p+t*q)/u);p=!1;z<y-1?0==m?(e.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m-1],y=m.getGeneralPurposeVariable(l),y=y+m.width/2+this.intraCellSpacing+e.width/2,y<z?(e.setGeneralPurposeVariable(l,z),p=!0):y<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,y),p=!0)):z>y+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m+1],y=m.getGeneralPurposeVariable(l),y=y-m.width/2-this.intraCellSpacing-e.width/2,y>z?(e.setGeneralPurposeVariable(l,
-z),p=!0):y>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,y),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l))}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)};
+l-1),u=p+q,x=e.getGeneralPurposeVariable(l),z=x;0<u&&(z=(r*p+t*q)/u);p=!1;z<x-1?0==m?(e.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m-1],x=m.getGeneralPurposeVariable(l),x=x+m.width/2+this.intraCellSpacing+e.width/2,x<z?(e.setGeneralPurposeVariable(l,z),p=!0):x<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,x),p=!0)):z>x+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,z),p=!0):(m=d[l][m+1],x=m.getGeneralPurposeVariable(l),x=x-m.width/2-this.intraCellSpacing-e.width/2,x>z?(e.setGeneralPurposeVariable(l,
+z),p=!0):x>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,x),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l))}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 k;k=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var l,g=d[f].cell;l=0;k=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
null!=k&&(l=k.length,l=0<l?this.medianXValue(k,c):g.getGeneralPurposeVariable(a));var m=0;k=-1E8;for(var n=d[f].rankIndex-1;0<=n;){var p=e[b[n].id];if(null!=p){var q=p.cell;p.visited?(k=q.getGeneralPurposeVariable(a)+q.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=q.width+this.intraCellSpacing,n--)}}m=0;q=1E8;for(n=d[f].rankIndex+1;n<d.length;)if(p=e[b[n].id],null!=p){var r=p.cell;p.visited?(q=r.getGeneralPurposeVariable(a)-r.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=r.width+
this.intraCellSpacing,n++)}l>=k&&l<=q?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>q&&(g.setGeneralPurposeVariable(a,q),this.currentXDelta+=l-q);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};
@@ -899,10 +899,10 @@ mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a
t;if(r.isVertex()){t=0==k?e.connectsAsSource:e.connectsAsTarget;for(var u=0;u<t.length;u++)if(t[u].source==r||t[u].target==r)f+=t[u].edges.length,q++,g.push(t[u])}else f+=r.edges.length,q++,g.push(r)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/f;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=0;m<g.length;m++)for(q=g[m].edges.length,r=this.jettyPositions[g[m].ids[0]],null==r&&(r=[],this.jettyPositions[g[m].ids[0]]=r),m<f/2?
p+=this.prefVertEdgeOff:m>f/2&&(p-=this.prefVertEdgeOff),t=0;t<q;t++)r[4*t+2*k]=n,n+=l,r[4*t+2*k+1]=p}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,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),q=[],r=a.isReversed;p!=g&&(r=!r);if(null!=f){var t=r?
-2:0,u=r?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],y=f[4*e+1+t];r!=l&&(y=-y);var u=u+y,t=f[4*e+t],z=k.model.getTerminal(n,!0);this.layout.isPort(z)&&k.model.getParent(z)==p&&(t=k.view.getState(z),t=null!=t?t.x:p.geometry.x+a.source.width*z.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(t,u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(t,u+y))):(q.push(new mxPoint(u,
-t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u+y,t)))}t=a.x.length-1;u=y=-1;p=a.maxRank-1;for(r&&(t=0,y=a.x.length,u=1,p=a.minRank+1);a.maxRank!=a.minRank&&t!=y;t+=u){var z=a.x[t]+b,x=(this.rankTopY[p]+this.rankBottomY[p+1])/2,A=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(r)var v=x,x=A,A=v;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(z,x)),q.push(new mxPoint(z,A))):(q.push(new mxPoint(x,z)),q.push(new mxPoint(A,
-z)));this.limitX=Math.max(this.limitX,z);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],y=f[4*e+3-t],r!=l&&(y=-y),u-=y,t=f[4*e+2-t],r=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(r)&&k.model.getParent(r)==p&&(t=k.view.getState(r),t=null!=t?t.x:p.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
-q.push(new mxPoint(t,u-y)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-y,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
+2:0,u=r?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],x=f[4*e+1+t];r!=l&&(x=-x);var u=u+x,t=f[4*e+t],z=k.model.getTerminal(n,!0);this.layout.isPort(z)&&k.model.getParent(z)==p&&(t=k.view.getState(z),t=null!=t?t.x:p.geometry.x+a.source.width*z.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(t,u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(t,u+x))):(q.push(new mxPoint(u,
+t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u+x,t)))}t=a.x.length-1;u=x=-1;p=a.maxRank-1;for(r&&(t=0,x=a.x.length,u=1,p=a.minRank+1);a.maxRank!=a.minRank&&t!=x;t+=u){var z=a.x[t]+b,y=(this.rankTopY[p]+this.rankBottomY[p+1])/2,A=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(r)var v=y,y=A,A=v;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(z,y)),q.push(new mxPoint(z,A))):(q.push(new mxPoint(y,z)),q.push(new mxPoint(A,
+z)));this.limitX=Math.max(this.limitX,z);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],x=f[4*e+3-t],r!=l&&(x=-x),u-=x,t=f[4*e+2-t],r=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(r)&&k.model.getParent(r)==p&&(t=k.view.getState(r),t=null!=t?t.x:p.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+q.push(new mxPoint(t,u-x)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-x,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);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;
@@ -1023,10 +1023,10 @@ mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.targetWindow=null;mxP
mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--\x3e');return a};mxPrintPreview.prototype.appendGraph=function(a,b,c,d,e,f){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.x0=c;this.y0=d;this.open(null,null,e,f)};
mxPrintPreview.prototype.open=function(a,b,c,d){var e=this.graph.cellRenderer.initializeOverlay,f=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(a,b,c,d){b.dialect=a.view.graph.dialect;b.init(a.view.getDrawPane())});this.wnd=null!=b?b:this.wnd;var g=!1;null==this.wnd&&(g=!0,this.wnd=window.open());var k=this.wnd.document;if(g){var l=this.getDoctype();null!=l&&0<l.length&&
k.writeln(l);mxClient.IS_VML?k.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):("CSS1Compat"===document.compatMode&&k.writeln("<!DOCTYPE html>"),k.writeln("<html>"));k.writeln("<head>");this.writeHead(k,a);k.writeln("</head>");k.writeln('<body class="mxPage">')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-=
-q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),y=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*y;var z=mxUtils.bind(this,function(){if(this.pageSelector&&(1<y||1<u)){var a=this.createPageSelector(y,u);k.body.appendChild(a);if(mxClient.IS_IE&&null==k.documentMode||
-5==k.documentMode||8==k.documentMode||7==k.documentMode){a.style.position="absolute";var b=function(){a.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),x=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;if(c||b)a.style.pageBreakAfter=
-"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),k.body.appendChild(a));(c||b)&&this.addPageBreak(k)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var v=0;v<A.length;v++)x(A[v],!0);for(var H=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<y;v++){var E=v*t/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<u;a++){if(null==this.wnd)return null;
-var G=a*r/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,C=v*u+a+1,B=new mxRectangle(G,E,r,t),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-G,-E,this.scale,C,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-G,-E)}),C);f.setAttribute("id","mxPage-"+C);x(f,null!=H||v<y-1||a<u-1)}}if(null!=H)for(v=0;v<H.length;v++)x(H[v],v<H.length-1);g&&!d&&(this.closeDocument(),z());this.wnd.focus()}catch(F){null!=f&&null!=f.parentNode&&
+q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),x=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*x;var z=mxUtils.bind(this,function(){if(this.pageSelector&&(1<x||1<u)){var a=this.createPageSelector(x,u);k.body.appendChild(a);if(mxClient.IS_IE&&null==k.documentMode||
+5==k.documentMode||8==k.documentMode||7==k.documentMode){a.style.position="absolute";var b=function(){a.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),y=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;if(c||b)a.style.pageBreakAfter=
+"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),k.body.appendChild(a));(c||b)&&this.addPageBreak(k)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var v=0;v<A.length;v++)y(A[v],!0);for(var E=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<x;v++){var H=v*t/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<u;a++){if(null==this.wnd)return null;
+var G=a*r/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,D=v*u+a+1,B=new mxRectangle(G,H,r,t),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-G,-H,this.scale,D,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-G,-H)}),D);f.setAttribute("id","mxPage-"+D);y(f,null!=E||v<x-1||a<u-1)}}if(null!=E)for(v=0;v<E.length;v++)y(E[v],v<E.length-1);g&&!d&&(this.closeDocument(),z());this.wnd.focus()}catch(F){null!=f&&null!=f.parentNode&&
f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("</body>");a.writeln("</html>");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1037,7 +1037,7 @@ mxPrintPreview.prototype.renderPage=function(a,b,c,d,e,f){f=this.wnd.document;va
b-2*this.border+"px",l.style.overflow="hidden",!mxClient.IS_IE||null!=f.documentMode&&5!=f.documentMode&&8!=f.documentMode&&7!=f.documentMode?(l.style.top=this.border+"px",l.style.left=this.border+"px"):(l.style.marginTop=this.border+"px",l.style.marginLeft=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(l.style.position="absolute"),g.appendChild(l),document.body.appendChild(g),k=l}catch(n){throw g.parentNode.removeChild(g),n;}e(k);return g};
mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e,f){var g=this.graph.getView();d=this.graph.container;this.graph.container=e;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var r=g.getTranslate();g.translate=new mxPoint(a,
-b);var t=this.graph.cellRenderer.redraw,u=g.states;a=g.scale;if(this.clipping){var y=new mxRectangle((f.x+r.x)*a,(f.y+r.y)*a,f.width*a/c,f.height*a/c);this.graph.cellRenderer.redraw=function(a,b,c){if(null!=a){var d=u.get(a.cell);if(null!=d&&(d=g.getBoundingBox(d,!1),null!=d&&!mxUtils.intersects(y,d)))return}t.apply(this,arguments)}}a=null;try{var z=[this.getRoot()];a=new mxTemporaryCellStates(g,c,z)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
+b);var t=this.graph.cellRenderer.redraw,u=g.states;a=g.scale;if(this.clipping){var x=new mxRectangle((f.x+r.x)*a,(f.y+r.y)*a,f.width*a/c,f.height*a/c);this.graph.cellRenderer.redraw=function(a,b,c){if(null!=a){var d=u.get(a.cell);if(null!=d&&(d=g.getBoundingBox(d,!1),null!=d&&!mxUtils.intersects(x,d)))return}t.apply(this,arguments)}}a=null;try{var z=[this.getRoot()];a=new mxTemporaryCellStates(g,c,z)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)z=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position="relative",c.style.top=this.marginTop+"px",c.setAttribute("width",f.width),c.setAttribute("height",f.height),c.style.width="",c.style.height=""):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=z;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),
0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(q);this.graph.container=d;this.graph.cellRenderer.redraw=t;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=r;a.destroy();g.setEventsEnabled(p)}};
mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
@@ -1153,23 +1153,23 @@ b.x=k.x,b.y=k.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,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=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),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,k)||mxUtils.contains(b,d.x,k)||e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,k)))))},
SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,m=!0,n=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var q=g.length-1;if(null!=d&&0<d.length){for(var n=[],r=0;r<d.length;r++){var t=a.view.transformControlPoint(a,d[r]);null!=t&&(t.x=
-Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,y=g[0],z=!1,x=!1,z=n;null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);for(r=0;2>r;r++){var A=null!=y&&y.x==z.x,v=null!=y&&y.y==z.y,H=null!=u&&z.y>=u.y&&z.y<=u.y+
-u.height,u=null!=u&&z.x>=u.x&&z.x<=u.x+u.width,z=v||null==y&&H,x=A||null==y&&u;if(0!=r||!(z&&x||A&&v)){if(null!=y&&!v&&!A&&(H||u)){m=H?!1:!0;break}if(x||z){m=z;1==r&&(m=0==d.length%2?z:x);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);z=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
+Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,x=g[0],z=!1,y=!1,z=n;null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),u=null);for(r=0;2>r;r++){var A=null!=x&&x.x==z.x,v=null!=x&&x.y==z.y,E=null!=u&&z.y>=u.y&&z.y<=u.y+
+u.height,u=null!=u&&z.x>=u.x&&z.x<=u.x+u.width,z=v||null==x&&E,y=A||null==x&&u;if(0!=r||!(z&&y||A&&v)){if(null!=x&&!v&&!A&&(E||u)){m=E?!1:!0;break}if(y||z){m=z;1==r&&(m=0==d.length%2?z:y);break}}u=c;x=g[q];null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),u=null);z=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
p.y));m?p.y=n.y:p.x=n.x;for(r=0;r<d.length;r++)m=!m,n=d[r],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[q];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[q]&&g[q].y!=n.y||null==g[q]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.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[q]&&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!=t&&null!=e[e.length-1]&&Math.abs(t.x-e[e.length-1].x)<k&&Math.abs(t.y-e[e.length-1].y)<k&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-t.x)<k&&(e[e.length-1].x=t.x),Math.abs(e[e.length-1].y-t.y)<k&&(e[e.length-1].y=t.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),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,q=null!=b?b.width:0,r=null!=b?b.height:0,t=null!=c?c.x:m.x,u=null!=c?c.y:m.y,y=null!=c?c.width:0,z=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 A=x+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,H=m.y-l.y,v=v*v+H*H<A*A;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)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),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
-q=v.width,r=v.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(t,u,y,z),v),t=v.x,u=v.y,y=v.width,z=v.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;r=Math.round(10*r)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;y=Math.round(10*y)/10;z=Math.round(10*z)/10;a=[0,0];n=[[n,p,q,r],[t,u,y,z]];x=[f,x];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=
-n[v][0]-x[v],mxEdgeStyle.limits[v][2]=n[v][1]-x[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+x[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+x[v];x=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);H=x-p;x=0;0>v?x=0>H?2:1:0>=H&&(x=3,0==v&&(x=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
+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),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,q=null!=b?b.width:0,r=null!=b?b.height:0,t=null!=c?c.x:m.x,u=null!=c?c.y:m.y,x=null!=c?c.width:0,z=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),y=a.view.scale*mxEdgeStyle.getJettySize(a,
+b,c,d,!1);null!=b&&c==b&&(f=y=Math.max(f,y));var A=y+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,E=m.y-l.y,v=v*v+E*E<A*A;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)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),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
+q=v.width,r=v.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(t,u,x,z),v),t=v.x,u=v.y,x=v.width,z=v.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;r=Math.round(10*r)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;x=Math.round(10*x)/10;z=Math.round(10*z)/10;a=[0,0];n=[[n,p,q,r],[t,u,x,z]];y=[f,y];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=
+n[v][0]-y[v],mxEdgeStyle.limits[v][2]=n[v][1]-y[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+y[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+y[v];y=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);E=y-p;y=0;0>v?y=0>E?2:1:0>=E&&(y=3,0==v&&(y=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
b[v][1]=(p.y-n[v][1])/n[v][3],1>=Math.abs(p.y-n[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[v][1]-n[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);v=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-A,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-A,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-A,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-A,0);A=[];
c=[];l=[];c[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=v>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=v>=p?v:p;q=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(l[v]&d[v])&&(l[v]=mxUtils.reversePortConstraints(l[v])),q[v][0]=l[v],q[v][1]=c[v]);0<p&&0<m&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
c[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=c[1],r=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=c[1],q[1][1]=l[1],r=!0));0<p&&!r&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=l[1],q[1][1]=c[1],r=!0);0<m&&!r&&(q[0][0]=c[0],q[0][1]=l[0],q[1][0]=c[1],q[1][1]=l[1]);for(v=0;2>v;v++)0==a[v]&&(0==(q[v][0]&d[v])&&(q[v][0]=q[v][1]),A[v]=q[v][0]&d[v],A[v]|=(q[v][1]&d[v])<<8,A[v]|=(q[1-v][v]&d[v])<<16,A[v]|=(q[1-v][1-v]&d[v])<<24,0==(A[v]&15)&&(A[v]<<=8),0==(A[v]&3840)&&(A[v]=A[v]&15|A[v]>>8),0==(A[v]&
-983040)&&(A[v]=A[v]&65535|(A[v]&251658240)>>8),a[v]=A[v]&15,d[v]==mxConstants.DIRECTION_MASK_WEST||d[v]==mxConstants.DIRECTION_MASK_NORTH||d[v]==mxConstants.DIRECTION_MASK_EAST||d[v]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[v]=d[v]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];A=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;A-=x;1>d&&(d+=4);1>A&&(A+=4);d=mxEdgeStyle.routePatterns[d-1][A-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+983040)&&(A[v]=A[v]&65535|(A[v]&251658240)>>8),a[v]=A[v]&15,d[v]==mxConstants.DIRECTION_MASK_WEST||d[v]==mxConstants.DIRECTION_MASK_NORTH||d[v]==mxConstants.DIRECTION_MASK_EAST||d[v]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[v]=d[v]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];A=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=y;A-=y;1>d&&(d+=4);1>A&&(A+=4);d=mxEdgeStyle.routePatterns[d-1][A-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=A=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(v=0;v<d.length;v++)l=d[v]&15,r=l==mxConstants.DIRECTION_MASK_EAST?3:l,r+=x,4<r&&(r-=4),m=mxEdgeStyle.dirVectors[r-1],l=0<r%2?0:1,l!=A&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[v]&mxEdgeStyle.TARGET_MASK),u=0<(d[v]&mxEdgeStyle.SOURCE_MASK),p=(d[v]&mxEdgeStyle.SIDE_MASK)>>5,p<<=x,15<p&&(p>>=4),q=0<(d[v]&mxEdgeStyle.CENTER_MASK),(u||t)&&9>p?(r=u?0:1,p=q&&0==l?n[r][0]+b[r][0]*n[r][2]:q?n[r][1]+b[r][1]*
+0:1;for(v=0;v<d.length;v++)l=d[v]&15,r=l==mxConstants.DIRECTION_MASK_EAST?3:l,r+=y,4<r&&(r-=4),m=mxEdgeStyle.dirVectors[r-1],l=0<r%2?0:1,l!=A&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[v]&mxEdgeStyle.TARGET_MASK),u=0<(d[v]&mxEdgeStyle.SOURCE_MASK),p=(d[v]&mxEdgeStyle.SIDE_MASK)>>5,p<<=y,15<p&&(p>>=4),q=0<(d[v]&mxEdgeStyle.CENTER_MASK),(u||t)&&9>p?(r=u?0:1,p=q&&0==l?n[r][0]+b[r][0]*n[r][2]:q?n[r][1]+b[r][1]*
n[r][3]:mxEdgeStyle.limits[r][p],0==l?(p=(p-mxEdgeStyle.wayPoints1[f][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*p)):(p=(p-mxEdgeStyle.wayPoints1[f][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*p))):q&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:A=l;for(v=0;v<=f&&(v!=f||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)==(f+1)%2);v++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[v][0]),Math.round(mxEdgeStyle.wayPoints1[v][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);
@@ -1322,7 +1322,7 @@ n=this.view.getState(this.model.getParent(a[f]));if(null!=m&&null!=n)if(c=n.orig
l.length;m++)l[m].x+=c,l[m].y+=n}else l.translate(c,n)}}else d=[]}return d};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,k,l){b=this.createVertex(a,b,c,d,e,f,g,k,l);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,k,l){a=new mxGeometry(d,e,f,g);a.relative=null!=l?l:!1;c=new mxCell(c,a,k);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,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var q=this.view.getState(p),r=null!=q?q.origin:n,t=this.model.getGeometry(a[l]);if(null!=t){var u=r.x-m.x,y=r.y-m.y,t=t.clone();t.translate(u,y);t.relative||!this.model.isVertex(a[l])||this.isAllowNegativeCoordinates()||
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var q=this.view.getState(p),r=null!=q?q.origin:n,t=this.model.getGeometry(a[l]);if(null!=t){var u=r.x-m.x,x=r.y-m.y,t=t.clone();t.translate(u,x);t.relative||!this.model.isVertex(a[l])||this.isAllowNegativeCoordinates()||
(t.x=Math.max(0,t.x),t.y=Math.max(0,t.y));this.model.setGeometry(a[l],t)}}b==p&&c+l>this.model.getChildCount(b)&&c--;this.model.add(b,a[l],c+l);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[l],!0);(null==k||k)&&this.isExtendParentsOnAdd(a[l])&&this.isExtendParent(a[l])&&this.extendParent(a[l]);(null==g||g)&&this.constrainChild(a[l]);null!=d&&this.cellConnected(a[l],d,!0);null!=e&&this.cellConnected(a[l],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};
@@ -1642,7 +1642,7 @@ mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreat
l.x-=k.origin.x;l.y-=k.origin.y}}this.graph.addCell(b,d)}var m=this.graph.getDefaultParent();null!=a&&null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot()&&(m=e.getParent(a),null!=a.geometry&&a.geometry.relative&&null!=b.geometry&&b.geometry.relative&&(m=e.getParent(m)));var n=k=null;null!=this.edgeState&&(k=this.edgeState.cell.value,n=this.edgeState.cell.style);g=this.insertEdge(m,null,k,a,b,n);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)){m=null;for(l=a;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=g.parent;)l=this.graph.model.getParent(l);null!=l&&null!=l.parent&&l.parent==g.parent&&(m=l.parent.getIndex(l),l.parent.insert(g,m))}var p=e.getGeometry(g);null==p&&(p=new mxGeometry,p.relative=!0,e.setGeometry(g,p));if(null!=
this.waypoints&&0<this.waypoints.length){var q=this.graph.view.scale,r=this.graph.view.translate;p.points=[];for(a=0;a<this.waypoints.length;a++){var t=this.waypoints[a];p.points.push(new mxPoint(t.x/q-r.x,t.y/q-r.y))}}if(null==b){var u=this.graph.view.translate,q=this.graph.view.scale,t=null!=this.originalPoint?new mxPoint(this.originalPoint.x/q-u.x,this.originalPoint.y/q-u.y):new mxPoint(this.currentPoint.x/q-u.x,this.currentPoint.y/q-u.y);t.x-=this.graph.panDx/this.graph.view.scale;t.y-=this.graph.panDy/
-this.graph.view.scale;p.setTerminalPoint(t,!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;p.setTerminalPoint(t,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(x){mxLog.show(),mxLog.debug(x.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 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 k=this.graph.view.getState(b);if(null!=k){var l=k.x/f-e.x,e=k.y/f-e.y;Math.abs(l-c.x)<=g&&(c.x=Math.round(l));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};
@@ -1977,8 +1977,8 @@ g={});for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var b=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(b,f,g)}c=c.nextSibling}return d};return a}());
var mxDefaultToolbarCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var b=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||
f,g=c.getAttribute("icon"),k=c.getAttribute("pressedIcon"),l=c.getAttribute("action"),m=c.getAttribute("mode"),n=c.getAttribute("template"),p="0"!=c.getAttribute("toggle"),q=mxUtils.getTextContent(c),r=null;if(null!=l)r=d.addItem(f,g,l,k);else if(null!=m)var t=mxDefaultToolbarCodec.allowEval?mxUtils.eval(q):null,r=d.addMode(f,g,m,k,t);else if(null!=n||null!=q&&0<q.length)r=b.templates[n],n=c.getAttribute("style"),null!=r&&null!=n&&(r=b.graph.cloneCells([r])[0],r.setStyle(n)),n=null,null!=q&&0<q.length&&
-mxDefaultToolbarCodec.allowEval&&(n=mxUtils.eval(q)),r=d.addPrototype(f,g,r,k,n,p);else if(k=mxUtils.getChildNodes(c),0<k.length)if(null==g)for(n=d.addActionCombo(f),f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(n,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(n,g,p));else{var u=null,y=d.addPrototype(f,g,function(){var a=b.templates[u.value];if(null!=a){var a=a.clone(),c=u.options[u.selectedIndex].cellStyle;null!=c&&a.setStyle(c);return a}mxLog.warn("Template "+
-a+" not found");return null},null,null,p),u=d.addCombo();mxEvent.addListener(u,"change",function(){d.toolbar.selectMode(y,function(a){a=mxUtils.convertPoint(b.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return b.addVertex(null,t(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(u,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),q=p.getAttribute("template"),d.addOption(u,g,q||n).cellStyle=p.getAttribute("style"))}null!=r&&(n=c.getAttribute("id"),
+mxDefaultToolbarCodec.allowEval&&(n=mxUtils.eval(q)),r=d.addPrototype(f,g,r,k,n,p);else if(k=mxUtils.getChildNodes(c),0<k.length)if(null==g)for(n=d.addActionCombo(f),f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(n,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(n,g,p));else{var u=null,x=d.addPrototype(f,g,function(){var a=b.templates[u.value];if(null!=a){var a=a.clone(),c=u.options[u.selectedIndex].cellStyle;null!=c&&a.setStyle(c);return a}mxLog.warn("Template "+
+a+" not found");return null},null,null,p),u=d.addCombo();mxEvent.addListener(u,"change",function(){d.toolbar.selectMode(x,function(a){a=mxUtils.convertPoint(b.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return b.addVertex(null,t(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(u,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),q=p.getAttribute("template"),d.addOption(u,g,q||n).cellStyle=p.getAttribute("style"))}null!=r&&(n=c.getAttribute("id"),
null!=n&&0<n.length&&r.setAttribute("id",n))}c=c.nextSibling}}return d};return a}());mxDefaultToolbarCodec.allowEval=!0;mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var b=c.getElementsByTagName("include")[0];null!=b?this.processInclude(a,b,d):null!=d&&(d.config=c);return d};return a}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
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");
@@ -1997,6 +1997,7 @@ Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYA
Editor.zoomOutLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABJklEQVQ4y4WT2XaDMAxEvWD2nSSUNEnTJN3r//+9Sj7ILAY6L0ijC4ONYVZRpo6cByrz2YKSUGorGTpz71lPVHvT+avoB5wIkU/mxk8veceSuNoLg44IzziXjvpih72wKQnm8yc2UoiP/LAd8jQfe2Xf4Pq+2EyYIvv9wbzHHCgwxDdlBtWZOdqDfTCVgqpygQpsZaojVAVc9UjQxnAJDIBhiQv84tq3gMQCAVTxVoSibXJf8tMuc7e1TB/DCmejBNg/w1Y3c+AM5vv4w7xM59/oXamrHaLVqPQ+OTCnmMZxgz0SdL5zji0/ld6j88qGa5KIiBB6WeJGKfUKwSMKLuXgvl1TW0tm5R9UQL/efSDYsnzxD8CinhBsTTdugJatKpJwf8v+ADb8QmvW7AeAAAAAAElFTkSuQmCC";
Editor.zoomInLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABKElEQVQ4y4WT6WKCMBCENwkBwn2oFKvWqr3L+79es4EkQIDOH2d3Pxk2ABiJlB8JCXjqw4LikHVGLHTm3nM3UeVN5690GBBN0GwyV/3kkrUQR+WeKnREeKpzaXWd77CmJiXGfPIEI4V4yQ9TIW/ntlcMBe731Vts9w5TWG8F5j3mQI4hvrKpdGeYA7CX9qAcl650gVJartxRuhyHVghF8idQAIbFLvCLu28BsQEC6aKtCK6Pyb3JT7PmbmtNH8Ny56CotD/2qOs5cJbuffxgXmCib+xddVU5RNOhkvvkhTlFehzVWCOh3++MYElOhfdovaImnRYVmqDdsuhNp1QrBBE6uGC2+3ZNjGdg5B94oD+9uyVgWT79BwAxEBTWdOu3bWBVgsn/N/AHUD9IC01Oe40AAAAASUVORK5CYII=";
Editor.actualSizeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA+vTcKMM96GRBHwXxi0YaX1HLrKWhiHpWEOnOr52Vb2xKSDcT19PKv5l/Ngdk8+viAAABIUlEQVQ4y4WT2XqDIBCFBxDc9yTWNEnTJN3r+79eGT4BEbXnaubMr8dBBaM450dCQp4LWFAascGIRd48eB4cNYE7f6XjgGiCFs5c+dml6CFN6j1V6IQIlHPpdV/usKcmJcV88gQTRXjLD9Mhb+fWq8YG9/uCmTCFjeeDeY85UGKIUGUuqzN42kv7oCouq9oHamlzVR1lVfpAIu1QVRiW+sAv7r4FpAYIZZVsRXB9TP5Dfpo1d1trCgzz1iiptH/sUbdz4CzN9+mLeXHn3+hdddd4RDegsrvzwZwSs2GLPRJidAqCLTlVwaMPqpYMWjTWBB2WRW86pVkhSKyDK2bdt2tmagZG4sBD/evdLQHLEvQfAOKRoLCmG1FAB6uKmby+gz+REDn7O5+EwQAAAABJRU5ErkJggg==";
+Editor.printLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAXVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9RKvvlAAAAHnRSTlMAydnl77qbMLT093H7K4Nd4Ktn082+lYt5bkklEgP44nQSAAAApUlEQVQ4y73P2Q6DIBRF0cOgbRHHzhP//5m9mBAQKjG1cT0Yc7ITAMu1LNQgUZiQ2DYoNQ0sCQb6qgHAfRx48opq3J9AZ6xuF7uOew8Ik1OsCZRS2UAC9V+D9a+QZYxNA45YFQftPtSkATOhw7dAc0vPBwKWiIOjP0JZ0yMuQJ27g36DipOUsqRAM0dR8KD1/ILHaHSE/w8DIx09E3g/BTce6rHUB5sAPKvfF+JdAAAAAElFTkSuQmCC";
Editor.layersLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAmVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v7///+bnZkkAAAAMnRSTlMABPr8ByiD88KsTi/rvJb272mjeUA1CuPe1M/KjVxYHxMP6KZ0S9nYzGRGGRaznpGIbzaGUf0AAAHESURBVDjLbZLZYoIwEEVDgLCjbKIgAlqXqt3m/z+uNwu1rcyDhjl3ktnYL7OY254C0VX3yWFZfzDrOClbbgKxi0YDHjwl4jbnRkXxJS/C1YP3DbBhD1n7Ex4uaAqdVDb3yJ/4J/3nJD2to/ngQz/DfUvzMp4JJ5sSCaF5oXmemgQDfDxzbi+Kq4sU+vNcuAmx94JtyOP2DD4Epz2asWSCz4Z/4fECxyNj9zC9xNLHcdPEO+awDKeSaUu0W4twZQiO2hYVisTR3RCtK/c1X6t4xMEpiGqXqVntEBLolkZZsKY4QtwH6jzq67dEHlJysB1aNOD3XT7n1UkasQN59L4yC2RELMDSeCRtz3yV22Ub3ozIUTknYx8JWqDdQxbUes98cR2kZtUSveF/bAhcedwEWmlxIkpZUy4XOCb6VBjjxHvbwo/1lBAHHi2JCr0NI570QhyHq/DhJoE2lLgyA4RVe6KmZ47O/3b86MCP0HWa73A8/C3SUc5Qc1ajt6fgpXJ+RGpMvDSchepZDOOQRcZVIKcK90x2D7etqtI+56+u6n3sPriO6nfphitR4+O2m3EbM7lh3me1FM1o+LMI887rN+s3/wZdTFlpNVJiOAAAAABJRU5ErkJggg==";
Editor.closeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAUVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////8IN+deAAAAGnRSTlMAuvAIg/dDM/QlOeuFhj0S5s4vKgzjxJRQNiLSey0AAADNSURBVDjLfZLbEoMgDEQjRRRs1XqX///QNmOHJSnjPkHOGR7IEmeoGtJZstnwjqbRfIsmgEdtPCqe9Ynz7ZSc07rE2QiSc+qv8TvjRXA2PDUm3dpe82iJhOEUfxJJo3aCv+jKmRmH4lcCjCjeh9GWOdL/GZZkXH3PYYDrHBnfc4D/RVZf5sjoC1was+Y6HQxwaUxFvq/a0Pv343VCTxfBSRiB+ab3M3eiQZXmMNBJ3Y8pGRZtYQ7DgHMXJEdPLTaN/qBjzJOBc3nmNcbsA16bMR0oLqf+AAAAAElFTkSuQmCC";
Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAgMAAAAOFJJnAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAgJsrThgAAABcSURBVBjThc6xDcAgDATAd8MQTEPW8TRUmYCGnzLRYyOlIV+dZFtvkICTFGqiJEzAG0/Uje9oL+e5Vu4F5yUYJxxqGKhQZ0eBvmgwYQLQaARKD1hbiPyDR0QOeAC31EyNe5X/kAAAAABJRU5ErkJggg==";Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFZJREFUOMvdkskRgDAMA4lDwg2B7b9XOlge/KKvdsa25KFb5XlRvxXC/DNBEv8IFNjBgGdDgXtFgTyhwDXiQAUHCvwa4Uv6mR6UR+1led2mVonvl+tML45qCQNQLIx7AAAAAElFTkSuQmCC";
@@ -2018,6 +2019,43 @@ a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.backg
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,c){b.undoableEditHappened(c.getProperty("edit"))};var c=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,c);a.getView().addListener(mxEvent.UNDO,c);c=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),e=a.getModel(),k=[],l=0;l<d.length;l++)(e.isVertex(d[l])||e.isEdge(d[l]))&&null!=a.view.getState(d[l])&&
k.push(d[l]);a.setSelectionCells(k)};b.addListener(mxEvent.UNDO,c);b.addListener(mxEvent.REDO,c);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,c,d,e,f,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);c+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(1,Math.round((document.body.scrollWidth-c-64)/2)),n=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");c=Math.min(c,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
+l.style.width=c+"px";l.style.height=d+"px";l.style.left=m+"px";l.style.top=n+"px";l.style.zIndex=this.zIndex;null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.left="0px",this.bg.style.top="0px",this.bg.style.bottom="0px",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));e&&document.body.appendChild(this.bg);l.appendChild(b);
+document.body.appendChild(l);f&&(b=document.createElement("img"),b.setAttribute("src",Dialog.prototype.closeImage),b.setAttribute("title",mxResources.get("close")),b.className="geDialogClose",b.style.top=n+14+"px",b.style.left=m+c+38-k+"px",b.style.zIndex=this.zIndex,mxEvent.addListener(b,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(b),this.dialogImg=b,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.onDialogClose=
+g;this.container=l;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+
+"/clear.gif";
+Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
+"/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);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var b=k.checked||m.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=.75*d,e=c.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/c.pageScale;if(b){var g=k.checked?1:parseInt(n.value);isNaN(g)||(f=mxUtils.getScaleForPageCount(g,c,e))}c.getGraphBounds();var l=g=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*d);e.height=Math.ceil(e.height*d);f*=d;!b&&c.pageVisible?(d=c.getPageLayout(),g-=d.x*e.width,l-=d.y*e.height):
+b=!0;b=PrintDialog.createPrintPreview(c,f,e,0,g,l,b);b.open();a&&PrintDialog.printPreview(b)}var c=a.editor.graph,d,e,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");e=document.createElement("td");e.setAttribute("colspan","2");e.style.fontSize="10pt";e.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("fitPage"));
+e.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(a)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(e);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");e=document.createElement("td");e.style.fontSize="10pt";e.appendChild(m);l=document.createElement("span");mxUtils.write(l," "+mxResources.get("posterPrint")+":");e.appendChild(l);mxEvent.addListener(l,
+"click",function(a){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(a)});d.appendChild(e);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";e=document.createElement("td");e.style.fontSize="10pt";e.appendChild(n);mxUtils.write(e," "+mxResources.get("pages")+" (max)");d.appendChild(e);g.appendChild(d);mxEvent.addListener(m,"change",
+function(){m.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);e=document.createElement("td");mxUtils.write(e,mxResources.get("pageScale")+":");d.appendChild(e);e=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";e.appendChild(p);d.appendChild(e);g.appendChild(d);d=document.createElement("tr");e=document.createElement("td");e.colSpan=2;
+e.style.paddingTop="20px";e.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&e.appendChild(l);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});q.className="geBtn";e.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});q.className="geBtn gePrimaryBtn";e.appendChild(q);a.editor.cancelFirst||
+e.appendChild(l);d.appendChild(e);g.appendChild(d);f.appendChild(g);this.container=f};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,c,d,e,f,g){b=new mxPrintPreview(a,b,c,d,e,f);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=g;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var k=b.writeHead;b.writeHead=function(a){k.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==n||n==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=n,m.style.backgroundImage="")}function c(){null==r?(q.removeAttribute("title"),q.style.fontSize="",q.innerHTML=mxResources.get("change")+"..."):(q.setAttribute("title",r.src),q.style.fontSize="11px",q.innerHTML=r.src.substring(0,42)+"...")}var d=a.editor.graph,e,f,g=document.createElement("table");g.style.width=
+"100%";g.style.height="100%";var k=document.createElement("tbody");e=document.createElement("tr");f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("paperSize")+":");e.appendChild(f);f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";var l=PageSetupDialog.addPageFormatPanel(f,"pagesetupdialog",d.pageFormat);e.appendChild(f);k.appendChild(e);e=document.createElement("tr");f=document.createElement("td");
+mxUtils.write(f,mxResources.get("background")+":");e.appendChild(f);f=document.createElement("td");f.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="18px";m.style.height="18px";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var n=d.background;b();mxEvent.addListener(m,"click",function(c){a.pickColor(n||"none",function(a){n=a;b()});mxEvent.consume(c)});
+f.appendChild(m);mxUtils.write(f,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();f.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?d.getGridSize():a)});e.appendChild(f);k.appendChild(e);e=document.createElement("tr");f=document.createElement("td");mxUtils.write(f,mxResources.get("image")+
+":");e.appendChild(f);f=document.createElement("td");var q=document.createElement("a");q.style.textDecoration="underline";q.style.cursor="pointer";q.style.color="#a0a0a0";var r=d.backgroundImage;mxEvent.addListener(q,"click",function(b){a.showBackgroundImageDialog(function(a){r=a;c()});mxEvent.consume(b)});c();f.appendChild(q);e.appendChild(f);k.appendChild(e);e=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="16px";f.setAttribute("align","right");var t=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&f.appendChild(t);var u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=n&&a.setBackgroundColor(n);d.backgroundImage!==r&&a.setBackgroundImage(r);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});u.className="geBtn gePrimaryBtn";f.appendChild(u);a.editor.cancelFirst||f.appendChild(t);e.appendChild(f);k.appendChild(e);g.appendChild(k);
+this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,b,c,d){function e(a,b,d){if(d||p!=document.activeElement&&q!=document.activeElement){a=!1;for(b=0;b<t.length;b++)d=t[b],y?"custom"==d.key&&(k.value=d.key,y=!1):null!=d.format&&(c.width==d.format.width&&c.height==d.format.height?(k.value=d.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,a=!0):c.width==d.format.height&&c.height==d.format.width&&(k.value=d.key,f.removeAttribute("checked"),
+f.defaultChecked=!1,f.checked=!1,g.setAttribute("checked","checked"),g.defaultChecked=!0,a=g.checked=!0));a?(l.style.display="",n.style.display="none"):(p.value=c.width,q.value=c.height,z.setAttribute("selected","selected"),f.setAttribute("checked","checked"),f.defaultChecked=!0,l.style.display="none",n.style.display="")}}b="format-"+b;var f=document.createElement("input");f.setAttribute("name",b);f.setAttribute("type","radio");f.setAttribute("value","portrait");var g=document.createElement("input");
+g.setAttribute("name",b);g.setAttribute("type","radio");g.setAttribute("value","landscape");var k=document.createElement("select");k.style.marginBottom="8px";k.style.width="202px";var l=document.createElement("div");l.style.marginLeft="4px";l.style.width="210px";l.style.height="24px";f.style.marginRight="6px";l.appendChild(f);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));l.appendChild(b);g.style.marginLeft="10px";g.style.marginRight="6px";l.appendChild(g);
+var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));l.appendChild(m);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var p=document.createElement("input");p.setAttribute("size","6");p.setAttribute("value",c.width);n.appendChild(p);mxUtils.write(n," x ");var q=document.createElement("input");q.setAttribute("size","6");q.setAttribute("value",c.height);n.appendChild(q);mxUtils.write(n," pt");
+l.style.display="none";n.style.display="none";for(var r={},t=PageSetupDialog.getFormats(),u=0;u<t.length;u++){var x=t[u];r[x.key]=x;var z=document.createElement("option");z.setAttribute("value",x.key);mxUtils.write(z,x.title);k.appendChild(z)}var y=!1;e();a.appendChild(k);mxUtils.br(a);a.appendChild(l);a.appendChild(n);var A=c,v=function(){var a=r[k.value];null!=a.format?(p.value=a.format.width,q.value=a.format.height,n.style.display="none",l.style.display=""):(l.style.display="none",n.style.display=
+"");a=new mxRectangle(0,0,parseInt(p.value),parseInt(q.value));"custom"!=k.value&&g.checked&&(a=new mxRectangle(0,0,a.height,a.width));if(a.width!=A.width||a.height!=A.height)A=a,null!=d&&d(A)};mxEvent.addListener(b,"click",function(a){f.checked=!0;v();mxEvent.consume(a)});mxEvent.addListener(m,"click",function(a){g.checked=!0;v();mxEvent.consume(a)});mxEvent.addListener(p,"blur",v);mxEvent.addListener(p,"click",v);mxEvent.addListener(q,"blur",v);mxEvent.addListener(q,"click",v);mxEvent.addListener(g,
+"change",v);mxEvent.addListener(f,"change",v);mxEvent.addListener(k,"change",function(){y="custom"==k.value;v()});v();return{set:function(a){c=a;e(null,null,!0)},get:function(){return A},widthInput:p,heightInput:q}};
+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:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1652)},{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,584,826)},{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 b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(b){a.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),
mxUtils.bind(this,function(b){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
@@ -2026,7 +2064,7 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,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=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+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 e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,k=d*this.pageScale,g=this.view.getBackgroundPageBounds();b=g.width;c=g.height;var l=new mxRectangle(d*e.x,d*
-e.y,f.width*k,f.height*k),m=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(c/l.height)-1:0,z=a?Math.ceil(b/l.width)-1:0,x=g.x+b,A=g.y+c;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?m:z,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(g.x),Math.round(g.y+(c+1)*l.height)),new mxPoint(Math.round(x),
+e.y,f.width*k,f.height*k),m=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(c/l.height)-1:0,z=a?Math.ceil(b/l.width)-1:0,y=g.x+b,A=g.y+c;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?m:z,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(g.x),Math.round(g.y+(c+1)*l.height)),new mxPoint(Math.round(y),
Math.round(g.y+(c+1)*l.height))]:[new mxPoint(Math.round(g.x+(c+1)*l.width),Math.round(g.y)),new mxPoint(Math.round(g.x+(c+1)*l.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 b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var e=0;e<c.length;e++)if(this.graph.getModel().isVertex(c[e])){var f=this.graph.getCellGeometry(c[e]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var c=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=c.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,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),g=Math.floor(Math.min(0,c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+
@@ -2043,14 +2081,14 @@ function(a){d.container.style.cursor="";e=!1});mxEvent.addListener(document,"key
function(a){return k.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 l=!1,m=null,n=null,p=null,q=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;
if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=a;n=c;p=b}}),r=this,t=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){t.apply(this,arguments);q();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;
if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=r.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));r.toolbar.setFontName(c);r.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var u=d.cellEditor.stopEditing;
-d.cellEditor.stopEditing=function(a,b){u.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var y=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
-mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var z="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
+d.cellEditor.stopEditing=function(a,b){u.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var x=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();x.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
+mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var z="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
e.push(f));f=d.getModel().getStyle(b.cell);for(var k=null!=f?f.split(";"):[],g=0;g<k.length;g++){var l=k[g],m=l.indexOf("=");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle=d.defaultVertexStyle;this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),H=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<H.length;a++)for(b=0;b<H[a].length;b++)z.push(H[a][b]);for(a=0;a<x.length;a++)z.push(x[a]);var E=function(a,b){d.getModel().beginUpdate();
-try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=z.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var r=p.substring(0,q),t=mxUtils.indexOf(n,r);0<=t&&n.splice(t,1);for(var u=0;u<H.length;u++){var y=H[u];if(0<=mxUtils.indexOf(y,r))for(var A=
-0;A<y.length;A++){var v=mxUtils.indexOf(n,y[A]);0<=v&&n.splice(v,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var r=n[f],C=e[r];null==C||"shape"==r&&!c||(!c||0>mxUtils.indexOf(x,r))&&d.setCellStyles(r,C,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
-b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));E(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&(e=d.getModel().isVertex(c[k])||e,!(f=d.getModel().isEdge(c[k])||f)||!e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(A,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
-mxUtils.indexOf(x,c[k]))f||0<=mxUtils.indexOf(v,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(z,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(z,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(v,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),E=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<E.length;a++)for(b=0;b<E[a].length;b++)z.push(E[a][b]);for(a=0;a<y.length;a++)z.push(y[a]);var H=function(a,b){d.getModel().beginUpdate();
+try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=z.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var r=p.substring(0,q),t=mxUtils.indexOf(n,r);0<=t&&n.splice(t,1);for(var u=0;u<E.length;u++){var x=E[u];if(0<=mxUtils.indexOf(x,r))for(var v=
+0;v<x.length;v++){var A=mxUtils.indexOf(n,x[v]);0<=A&&n.splice(A,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var r=n[f],D=e[r];null==D||"shape"==r&&!c||(!c||0>mxUtils.indexOf(y,r))&&d.setCellStyles(r,D,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){H(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){H(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
+b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));H(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&(e=d.getModel().isVertex(c[k])||e,!(f=d.getModel().isEdge(c[k])||f)||!e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(A,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
+mxUtils.indexOf(y,c[k]))f||0<=mxUtils.indexOf(v,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(z,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(z,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(v,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}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=
@@ -2075,20 +2113,20 @@ EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.g
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 b=null;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(b,c){if(null!=a.container){var d=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=a.view.translate,f=a.view.scale,d=mxRectangle.fromRectangle(d);d.x=d.x/f-e.x;d.y=d.y/f-e.y;d.width/=f;d.height/=f;var e=
a.container.scrollTop,k=a.container.scrollLeft,g=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)g+=3;var l=a.container.offsetWidth-g,m=b?Math.max(.3,Math.min(c||1,l/d.width)):f;a.view.scaleAndTranslate(m,Math.max((l-m*d.width)/2,0)/m-d.x,Math.max((a.container.offsetHeight-g-m*d.height)/4,0)/m-d.y);a.container.scrollTop=e*m/f;a.container.scrollLeft=k*m/f}});var c=mxUtils.bind(this,function(){b(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",c)});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)};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%";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 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):
+"#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 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",d);d();var e=0,d=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=d(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();
-mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")||"Previous Page"),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")||"Next Page"),l=mxUtils.bind(this,function(){null!=
-this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",f.style.display="",g.style.display="inline-block"):(k.style.display="none",f.style.display="none",g.style.display=
-"none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,(mxResources.get("zoomOut")||"Zoom Out")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,(mxResources.get("zoomIn")||"Zoom In")+" (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")||"Fit");var n=null,p=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),r=mxUtils.bind(this,
-function(a){null!=n&&(window.clearTimeout(n),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 t=d(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=t.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")||"Layers"),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){t.style.display=1<u.getChildCount(u.root)?"":"none"})}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")||"Open in New Window");a.lightbox&&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")||
-"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*e+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||r(30),q())}));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)?q():r(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():r(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var y=a.getTolerance(),z=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)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())<y&&(0<parseFloat(z.chromelessToolbar.style.opacity||0)?q():r(30))}})}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(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.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(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),k=a.minimumGraphSize;if(null==
+mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&
+null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",f.style.display="",g.style.display="inline-block"):(k.style.display="none",f.style.display="none",g.style.display="none");l()});this.editor.addListener("resetGraphView",
+m);this.editor.addListener("pageSelected",l);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 n=null,p=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),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 t=d(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=t.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")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){t.style.display=1<u.getChildCount(u.root)?"":"none"})}d(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"));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&&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);this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||r(30),q())}));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)?q():r(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():r(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var x=a.getTolerance(),z=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)<x&&Math.abs(this.scrollTop-a.container.scrollTop)<x&&Math.abs(this.startX-c.getGraphX())<x&&Math.abs(this.startY-c.getGraphY())<x&&(0<parseFloat(z.chromelessToolbar.style.opacity||0)?q():r(30))}})}else if(this.editor.extendCanvas){var y=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}y.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(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),k=a.minimumGraphSize;if(null==
k||k.width!=e||k.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&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(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
1;var v=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!=v&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-v.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
@@ -2179,12 +2217,12 @@ function(){var a=n.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 p=new mxRubberband(this);
this.getRubberband=function(){return p};var q=(new Date).getTime(),r=0,t=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;t.apply(this,arguments);a!=this.currentState?(q=(new Date).getTime(),r=0):r=(new Date).getTime()-q};var u=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"))&&u.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||mxEvent.isShiftDown(a)};var z=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return z.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 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))};
+"outlineConnect","1"))&&u.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var z=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return z.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(y=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=y)}));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 v=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return v.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 k=this.getModel(),g=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var m=k.getChildCount(e),n=0;n<m;n++){var p=
-k.getChildAt(e,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var r=mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
-!1:H.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)),p.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=
+k.getChildAt(e,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var r=mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
+!1:E.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 H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();H=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)),p.start(c.x,c.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);H=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 G=this.updateMouseEvent;this.updateMouseEvent=function(a){a=G.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);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;
@@ -2202,8 +2240,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
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 k=c?"getUTC":"get",l=a[k+"Date"](),m=a[k+"Day"](),n=a[k+"Month"](),p=a[k+"FullYear"](),q=a[k+"Hours"](),r=a[k+"Minutes"](),t=a[k+"Seconds"](),k=a[k+"Milliseconds"](),u=c?0:a.getTimezoneOffset(),y={d:l,dd:g(l),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
-12],yy:String(p).slice(2),yyyy:p,h:q%12||12,hh:g(q%12||12),H:q,HH:g(q),M:r,MM:g(r),s:t,ss:g(t),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<u?"-":"+")+g(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%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 k=c?"getUTC":"get",l=a[k+"Date"](),m=a[k+"Day"](),n=a[k+"Month"](),p=a[k+"FullYear"](),q=a[k+"Hours"](),r=a[k+"Minutes"](),t=a[k+"Seconds"](),k=a[k+"Milliseconds"](),u=c?0:a.getTimezoneOffset(),x={d:l,dd:g(l),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
+12],yy:String(p).slice(2),yyyy:p,h:q%12||12,hh:g(q%12||12),H:q,HH:g(q),M:r,MM:g(r),s:t,ss:g(t),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<u?"-":"+")+g(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[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.setAttribute("type","checkbox");b.isVisible(c)&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d.appendChild(e);var k=c.value||
mxResources.get("background")||"Background";d.setAttribute("title",k);mxUtils.write(d,k);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};
@@ -2285,13 +2323,13 @@ arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=
this.graph.currentEdgeStyle[b];return a};var c=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=c.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var c=
b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",html:"1",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+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return 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(K){}return d}if(null!=
+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(J){}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),k=b.getTerminal(e,!1);b.setTerminal(e,k,!0);b.setTerminal(e,f,!1);var g=b.getGeometry(e);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var l=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);
g.setTerminalPoint(l,!1);g.setTerminalPoint(m,!0);b.setGeometry(e,g);var n=this.view.getState(e),p=this.view.getState(f),q=this.view.getState(k);if(null!=n){var r=null!=p?this.getConnectionConstraint(n,p,!0):null,t=null!=q?this.getConnectionConstraint(n,q,!1):null;this.setConnectionConstraint(e,f,!0,t);this.setConnectionConstraint(e,k,!1,r)}c.push(e)}}else if(b.isVertex(e)&&(g=this.getCellGeometry(e),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var u=g.width;g.width=g.height;
-g.height=u;b.setGeometry(e,g);var y=this.view.getState(e);if(null!=y){var D=y.style[mxConstants.STYLE_DIRECTION]||"east";"east"==D?D="south":"south"==D?D="west":"west"==D?D="north":"north"==D&&(D="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,D,[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);
+g.height=u;b.setGeometry(e,g);var x=this.view.getState(e);if(null!=x){var C=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==C?C="south":"south"==C?C="west":"west"==C?C="north":"north"==C&&(C="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,C,[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=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&
d==mxConstants.NONE&&b.push(a[c])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.setAttributeForCell=function(a,b,c){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!=c&&
@@ -2325,31 +2363,31 @@ c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)last
if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=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,k){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(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 k=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&&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)}k.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
-mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0,
-g.length-1));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(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=f?"bold":"normal";this.textarea.style.fontStyle=
-k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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 g=mxUtils.htmlEntities(this.textarea.innerHTML);
-mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";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!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=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 c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;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)/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="",l.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 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"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 m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(ca){}};var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=
-function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(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 p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);p.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=
-function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(b.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,b){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(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var q=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=
-this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=q.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){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;":(b=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/b)+" x "+this.roundLength(this.bounds.height/
-b)),b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==b&&(b=this.bounds),this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=b.y+b.height+12+"px")};mxVertexHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;mxEdgeHandler.prototype.updateHint=function(b,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,
-e=this.graph.view.scale,f=this.roundLength(c.x/e-d.x),d=this.roundLength(c.y/e-d.y);this.hint.innerHTML=f+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-
-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),c.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==":
+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(da){}};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 k=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&&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)}k.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||
+8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==
+g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD,k=(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=
+f?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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 g=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";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!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=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 c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;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)/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=
+"",l.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 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"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 m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}};
+var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(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 p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&
+(e=null);p.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=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(b.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,b){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(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var q=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&
+null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=q.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){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;":(b=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/
+b)+" x "+this.roundLength(this.bounds.height/b)),b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==b&&(b=this.bounds),this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=b.y+b.height+12+"px")};mxVertexHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;mxEdgeHandler.prototype.updateHint=function(b,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));
+var d=this.graph.view.translate,e=this.graph.view.scale,f=this.roundLength(c.x/e-d.x),d=this.roundLength(c.y/e-d.y);this.hint.innerHTML=f+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=
+Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),c.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=":
IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.secondaryHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEJBMUVERjNEMkZDMTFFM0I0Qzc5RkE1RTc2NjI0OUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEJBMUVERjREMkZDMTFFM0I0Qzc5RkE1RTc2NjI0OUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowQkExRURGMUQyRkMxMUUzQjRDNzlGQTVFNzY2MjQ5QiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowQkExRURGMkQyRkMxMUUzQjRDNzlGQTVFNzY2MjQ5QiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvXDOj4AAAFqSURBVHjarFTNToNAEN5FLeiBmDRe7MGLF4IXbp71KapP4CPoO/QdvKiv4ME0PkAvJI2J0SueIHgAAk3b7XxkwSlgE38mmSwz8+3HsPMtUnSbbKww1VhbYB5XbrBnpX3JnlUXSbURvk1ukvcYyYy8IJ9rsoqw3MAJtsh3Xdc98H3/KgzDuyRJHrEiRh51jTOaX4LEDrk9Go1O0zR9UWTL9E0to+dyhSGPOnAab/DPKDtwHOcoy7LXz1SpxeRSzW9F7YiRRx041pGsSMC6Ty1f442LycUawRfRsOyIcDfA632ST6A3GAzOVfYu1PS+c+5q+iBQJ9wZO3TJD1aaptkX+YfYaFS3LKvPXl4fTDn3oigiYR1uJqF6nucR14rBglkQBGO5dyzkybBbxpRHHTitm5rox9PxPK81nZZOAKx1Eo5rnSD/nU54NzhxGx1hjHEcP5FifayItT5sjVvTyJ/vzr/f4l//T1YCDAC4VAdLL1OIRAAAAABJRU5ErkJggg==":
@@ -2367,14 +2405,14 @@ e,this.graph.getDefaultParent(),!0,!0),c=0;c<g.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,k=this.graph.tolerance;if(null!=this.div||Math.abs(e)>k||Math.abs(f)>k)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 t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);t.apply(this,arguments)};var u=(new Date).getTime(),y=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){z.apply(this,arguments);c!=this.currentTerminalState?(u=(new Date).getTime(),
-y=0):y=(new Date).getTime()-u;this.currentTerminalState=c};var x=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"))&&x.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 t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);t.apply(this,arguments)};var u=(new Date).getTime(),x=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){z.apply(this,arguments);c!=this.currentTerminalState?(u=(new Date).getTime(),
+x=0):x=(new Date).getTime()-u;this.currentTerminalState=c};var y=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&y.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 v=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 v.apply(this,arguments)};var H=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))):H.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 G=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){G.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()?"":
+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 v.apply(this,arguments)};var E=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))):E.apply(this,arguments)};var H=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)&&H.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 G=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){G.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.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));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);this.updateLinkHint(c);null!=c&&(a=!0);a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b){if(null==b||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="4px 10px 6px 10px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter=
@@ -2383,16 +2421,16 @@ b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.
mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){F.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));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell);null!=b&&(this.updateLinkHint(b),this.redrawHandles())};var I=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var M=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){M.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
+"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+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 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 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 ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var T=mxEdgeHandler.prototype.destroy;mxEdgeHandler.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),
+a.height+6+this.state.view.graph.tolerance)+"px"}};var aa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){aa.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 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 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(){mxActor.call(this)}function t(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,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function H(){mxShape.call(this)}function E(){mxShape.call(this)}function G(){mxEllipse.call(this)}function C(){mxShape.call(this)}
-function B(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function N(){mxShape.call(this)}function M(){mxShape.call(this)}function U(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function ba(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function ca(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function J(){mxActor.call(this)}
-function X(){mxActor.call(this)}function fa(){mxActor.call(this)}function K(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxActor.call(this)}function Y(){mxActor.call(this)}function aa(){mxActor.call(this)}function Q(){mxActor.call(this)}function W(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function R(){mxEllipse.call(this)}function V(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function la(){mxEllipse.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function z(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function E(){mxShape.call(this)}function H(){mxShape.call(this)}function G(){mxEllipse.call(this)}function D(){mxShape.call(this)}
+function B(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function N(){mxShape.call(this)}function L(){mxShape.call(this)}function U(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function aa(){mxDoubleEllipse.call(this)}function S(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function K(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}
+function X(){mxActor.call(this)}function O(){mxActor.call(this)}function J(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function Q(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function R(){mxEllipse.call(this)}function V(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function la(){mxEllipse.call(this)}
function ma(){mxActor.call(this)}function na(){mxActor.call(this)}function oa(){mxActor.call(this)}function xa(a,b,c,d,e,f,k,g,l,m){k+=l;var n=d.clone();d.x-=e*(2*k+l);d.y-=f*(2*k+l);e*=k+l;f*=k+l;return function(){a.ellipse(n.x-e-k,n.y-f-k,2*k,2*k);m?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()};mxCellRenderer.prototype.defaultShapes.cube=a;var ua=Math.tan(mxUtils.toRadians(30)),ja=(.5-ua)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/ua);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+ua));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=
@@ -2415,44 +2453,44 @@ mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"
mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?(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 Ea=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ea.apply(this,arguments)};mxUtils.extend(u,mxRectangleShape);u.prototype.size=.1;u.prototype.isHtmlAllowed=function(){return!1};u.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};u.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 k=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));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=u;mxUtils.extend(y,mxActor);y.prototype.size=.2;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(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=y;mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.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=z;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 ya=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){ya.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));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=u;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(z,mxHexagon);z.prototype.size=.25;z.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=z;mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.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=y;var ya=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){ya.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),ya.apply(this,[a,b,c,d,e]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.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};A.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,k;do{k=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=k){var g=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+f+"Height"],
p=this.style["symbol"+f+"Spacing"]||0,q=this.style["symbol"+f+"ArcSpacing"];null!=q&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*q);var q=b,r=c,q=g==mxConstants.ALIGN_CENTER?q+(d-m)/2:g==mxConstants.ALIGN_RIGHT?q+(d-m-p):q+p,r=l==mxConstants.ALIGN_MIDDLE?r+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?r+(e-n-p):r+p;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,q,r,m,n);a.restore()}f++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.prototype.defaultShapes.ext=A;mxUtils.extend(v,mxCylinder);v.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=v;mxUtils.extend(H,mxShape);H.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=H;mxUtils.extend(E,mxShape);E.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};E.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=E;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(C,mxShape);C.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=C;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.ext=A;mxUtils.extend(v,mxCylinder);v.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=v;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(H,mxShape);H.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};H.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=H;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(D,mxShape);D.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=D;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(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)))),k=mxUtils.getValue(this.style,
"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=F&&(k=new k,k.apply(this.state),a.save(),k.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(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(a.x,a.y,b,c)};I.prototype.paintBackground=function(a,b,c,d,
e){var f=this.corner,k=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=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+k,c);a.lineTo(b+k,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,k-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=
I;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);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)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+k);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-k,f/2);a.quadTo((d-f)/2-k,f+k,d/2,f+k);a.quadTo((d+f)/2+k,f+k,(d+f)/2+k,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=M;mxUtils.extend(U,
+(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);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(L,
+mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+k);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-k,f/2);a.quadTo((d-f)/2-k,f+k,d/2,f+k);a.quadTo((d+f)/2+k,f+k,(d+f)/2+k,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=L;mxUtils.extend(U,
mxCylinder);U.prototype.jettyWidth=32;U.prototype.jettyHeight=12;U.prototype.redrawPath=function(a,b,c,d,e,f){var k=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=k/2;var k=c+k/2,g=.3*e-b/2,l=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(k,g),a.lineTo(k,g+b),a.lineTo(c,g+b),a.moveTo(c,l),a.lineTo(k,l),a.lineTo(k,l+b),a.lineTo(c,l+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,l+b),a.lineTo(0,
-l+b),a.lineTo(0,l),a.lineTo(c,l),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=U;mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.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=P;mxUtils.extend(ba,
-P);ba.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=ba;mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=T;mxUtils.extend(D,mxArrowConnector);D.prototype.defaultWidth=10;D.prototype.defaultArrowWidth=
-20;D.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};D.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=D;mxUtils.extend(ca,mxActor);ca.prototype.size=30;
-ca.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=ca;mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=
-function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));k=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+k,c);a.lineTo(b+
-k,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=L;mxUtils.extend(J,mxActor);J.prototype.dx=20;J.prototype.dy=20;J.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=J;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(fa,mxActor);fa.prototype.arrowWidth=.3;fa.prototype.arrowSize=.2;fa.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,k=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,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=fa;mxUtils.extend(K,mxActor);K.prototype.redrawPath=
-function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",fa.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",fa.prototype.arrowSize))));c=(e-f)/2;var f=c+f,k=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,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=K;mxUtils.extend(O,mxActor);O.prototype.size=.1;O.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=O;mxUtils.extend(S,mxActor);S.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=S;mxUtils.extend(Y,mxActor);Y.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=Y;mxUtils.extend(aa,mxActor);aa.prototype.size=20;aa.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=aa;mxUtils.extend(Q,mxActor);Q.prototype.size=.375;Q.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=Q;mxUtils.extend(W,mxEllipse);W.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=
-W;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,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=Z;mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();
+l+b),a.lineTo(0,l),a.lineTo(c,l),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=U;mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.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=P;mxUtils.extend(aa,
+P);aa.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=aa;mxUtils.extend(S,mxArrowConnector);S.prototype.defaultWidth=4;S.prototype.isOpenEnded=function(){return!0};S.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};S.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=S;mxUtils.extend(C,mxArrowConnector);C.prototype.defaultWidth=10;C.prototype.defaultArrowWidth=
+20;C.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};C.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};C.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=C;mxUtils.extend(W,mxActor);W.prototype.size=30;W.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=W;mxUtils.extend(K,mxRectangleShape);K.prototype.dx=20;K.prototype.dy=20;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.paintForeground=function(a,
+b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));k=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+k,c);a.lineTo(b+k,
+c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=K;mxUtils.extend(da,mxActor);da.prototype.dx=20;da.prototype.dy=20;da.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=da;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(O,mxActor);O.prototype.arrowWidth=.3;O.prototype.arrowSize=.2;O.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,k=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,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=O;mxUtils.extend(J,mxActor);J.prototype.redrawPath=
+function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize))));c=(e-f)/2;var f=c+f,k=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,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=J;mxUtils.extend(M,mxActor);M.prototype.size=.1;M.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=M;mxUtils.extend(T,mxActor);T.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=T;mxUtils.extend(ba,mxActor);ba.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=ba;mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.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=Y;mxUtils.extend(Q,mxActor);Q.prototype.size=.375;Q.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=Q;mxUtils.extend(Z,mxEllipse);Z.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=
+Z;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(R,mxEllipse);R.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=R;mxUtils.extend(V,mxRhombus);V.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=V;mxUtils.extend(ga,
-mxEllipse);ga.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=ga;mxUtils.extend(da,mxEllipse);da.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=da;mxUtils.extend(ha,mxEllipse);ha.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(),"1"==mxUtils.getValue(this.style,"top","1")&&(a.begin(),
+mxEllipse);ga.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=ga;mxUtils.extend(ea,mxEllipse);ea.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=ea;mxUtils.extend(ha,mxEllipse);ha.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(),"1"==mxUtils.getValue(this.style,"top","1")&&(a.begin(),
a.moveTo(b,c),a.lineTo(b+d,c),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"right","1")&&(a.begin(),a.moveTo(b+d,c),a.lineTo(b+d,c+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"bottom","1")&&(a.begin(),a.moveTo(b+d,c+e),a.lineTo(b,c+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"left","1")&&(a.begin(),a.moveTo(b,c+e),a.lineTo(b,c),a.end(),a.stroke()))};mxCellRenderer.prototype.defaultShapes.partialRectangle=ha;mxUtils.extend(la,mxEllipse);la.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=la;mxUtils.extend(ma,mxActor);ma.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=
ma;mxUtils.extend(na,mxActor);na.prototype.size=.2;na.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 k=(d-f)/2,f=k+f;a.moveTo(0,b);a.lineTo(k,b);a.lineTo(k,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(k,e);a.lineTo(k,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=na;mxUtils.extend(oa,mxActor);oa.prototype.size=
@@ -2460,12 +2498,12 @@ ma;mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.redrawPath=funct
n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,k,g,l,m){var n=e*(k+l+1),p=f*(k+l+1);return function(){a.begin();a.moveTo(d.x-n/2-p/2,d.y-p/2+n/2);a.lineTo(d.x+p/2-3*n/2,d.y-3*p/2-n/2);a.moveTo(d.x-n/2+p/2,d.y-p/2-n/2);a.lineTo(d.x-p/2-3*n/2,d.y-3*p/2+n/2);a.stroke()}});mxMarker.addMarker("circle",xa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,k,g,l,m){var n=d.clone(),p=xa.apply(this,arguments),q=e*(k+2*l),r=f*(k+2*l);return function(){p.apply(this,arguments);a.begin();
a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*q+e*l,n.y-2*r+f*l);a.moveTo(n.x-q-r+f*l,n.y-r+q-e*l);a.lineTo(n.x+r-q-f*l,n.y-r-q+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,k,g,l,m){b=e*l*1.118;c=f*l*1.118;e*=k+l;f*=k+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);g?a.lineTo(n.x-e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=
null!=a?a:2;return function(b,c,d,e,f,k,g,l,m,n){f*=g+m;k*=g+m;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);l?b.lineTo(p.x-f-k/a,p.y-k+f/a):b.lineTo(p.x+k/a-f,p.y-k-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var za=function(a,b,c){return pa(a,["width"],b,function(b,d,e,f,k){k=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*k/2,f.y+e*b/4-d*k/2)},function(b,d,e,f,k,g){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*
-b)/a.view.scale-c})},pa=function(a,b,c,d,e){var f=a.absolutePoints,k=f.length-1,g=a.view.translate,l=a.view.scale,m=c?f[0]:f[k],n=c?f[1]:f[k-1],p=n.x-m.x,q=n.y-m.y,r=Math.sqrt(p*p+q*q);return ea(a,b,function(a){a=d.call(this,r,p/r,q/r,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+q*q);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,q/a,m,n,b,c)})},ka=function(a){return function(b){return[ea(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",fa.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",fa.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))})]}},va=function(a,b,c){return function(d){var e=[ea(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(ia(d));return e}},ra=function(a,b,c){c=null!=c?c:1;return function(d){var e=[ea(d,["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))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ia(d));return e}},Aa=function(a){return function(b){var c=[ea(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.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)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(ia(b));return c}},qa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b}},ia=function(a,b){return ea(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=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)*d),c.y+(null!=b?b:c.height/8))},function(a,b,c){this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.min(50,Math.max(0,100*(a.width-b.x+a.x)/Math.min(a.width,a.height))))})},ea=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);a.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};a.getPosition=c;a.setPosition=d;a.ignoreGrid=null!=e?e:!0;return a},wa={link:function(a){return[za(a,!0,10),za(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)!=
+b)/a.view.scale-c})},pa=function(a,b,c,d,e){var f=a.absolutePoints,k=f.length-1,g=a.view.translate,l=a.view.scale,m=c?f[0]:f[k],n=c?f[1]:f[k-1],p=n.x-m.x,q=n.y-m.y,r=Math.sqrt(p*p+q*q);return fa(a,b,function(a){a=d.call(this,r,p/r,q/r,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+q*q);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,q/a,m,n,b,c)})},ka=function(a){return function(b){return[fa(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"arrowWidth",O.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",O.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))})]}},va=function(a,b,c){return function(d){var e=[fa(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(ia(d));return e}},ra=function(a,b,c){c=null!=c?c:1;return function(d){var e=[fa(d,["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))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ia(d));return e}},Aa=function(a){return function(b){var c=[fa(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.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)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
+!1)&&c.push(ia(b));return c}},qa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b}},ia=function(a,b){return fa(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=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)*d),c.y+(null!=b?b:c.height/8))},function(a,b,c){this.state.style[mxConstants.STYLE_ARCSIZE]=
+Math.round(Math.min(50,Math.max(0,100*(a.width-b.x+a.x)/Math.min(a.width,a.height))))})},fa=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);a.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};a.getPosition=c;a.setPosition=d;a.ignoreGrid=null!=e?e:!0;return a},wa={link:function(a){return[za(a,!0,10),za(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(pa(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,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,
f.y,f.x+e,f.y-d,g.x,g.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(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.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(pa(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,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,
@@ -2474,43 +2512,43 @@ a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-pars
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,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,g.x,g.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(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(l.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(pa(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,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,g.x,g.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(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=
-a.style.endWidth);mxEvent.isAltDown(l.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=[ea(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
+a.style.endWidth);mxEvent.isAltDown(l.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=[fa(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(ia(a,c/2))}return b},label:qa(),ext:qa(),rectangle:qa(),triangle:qa(),rhombus:qa(),umlLifeline:function(a){return[ea(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){var b=
-[ea(a,["width","height"],function(a){var b=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),c=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+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,b.y-a.y)))},
-!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},process:function(a){var b=[ea(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.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(ia(a));return b},cross:function(a){return[ea(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",na.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[ea(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=[ea(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ca.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(ia(a));return b},dataStorage:function(a){return[ea(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.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))})]},internalStorage:function(a){var b=[ea(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),
-c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.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(ia(a));return b},corner:function(a){return[ea(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",J.prototype.dx))),
-c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",J.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[ea(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:ka(1),doubleArrow:ka(.5),folder:function(a){return[ea(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[ea(a,["size"],
-function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.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[ea(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.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[ea(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.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(y.prototype.size,!0),hexagon:ra(z.prototype.size,!0,.5),curlyBracket:ra(q.prototype.size,!1),display:ra(oa.prototype.size,!1),cube:va(1,
-a.prototype.size,!1),card:va(.5,k.prototype.size,!0),loopLimit:va(.5,aa.prototype.size,!0),trapezoid:Aa(.5),parallelogram:Aa(1)};Graph.createHandle=ea;Graph.handleFactory=wa;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=wa[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=wa[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),ka=mxUtils.toRadians(-30),sa=mxUtils.getRotatedPoint(sa,
-Math.cos(ka),Math.sin(ka)),ka=mxUtils.toRadians(-150),ta=mxUtils.getRotatedPoint(ta,Math.cos(ka),Math.sin(ka));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=sa.x,m=sa.y,n=ta.x,p=ta.y,q="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=k&&null!=g){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);q?(c&&(r=new mxPoint(r.x+l*b,r.y+m*b),e.push(r)),r=new mxPoint(r.x+n*a,r.y+p*a)):(c&&(r=new mxPoint(r.x+n*a,r.y+p*a),e.push(r)),r=new mxPoint(r.x+l*b,r.y+m*b));e.push(r)};var r=g;null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fa=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Fa.apply(this,arguments)};b.prototype.constraints=[];c.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;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=
-mxEllipse.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,
+parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ia(a,c/2))}return b},label:qa(),ext:qa(),rectangle:qa(),triangle:qa(),rhombus:qa(),umlLifeline:function(a){return[fa(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){var b=
+[fa(a,["width","height"],function(a){var b=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),c=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+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,b.y-a.y)))},
+!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},process:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.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(ia(a));return b},cross:function(a){return[fa(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",na.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[fa(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=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.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(ia(a));return b},dataStorage:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.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))})]},internalStorage:function(a){var b=[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",K.prototype.dx))),
+c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",K.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(ia(a));return b},corner:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),
+c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.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[fa(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:ka(1),doubleArrow:ka(.5),folder:function(a){return[fa(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[fa(a,["size"],
+function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.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[fa(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.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[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.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),hexagon:ra(z.prototype.size,!0,.5),curlyBracket:ra(q.prototype.size,!1),display:ra(oa.prototype.size,!1),cube:va(1,
+a.prototype.size,!1),card:va(.5,k.prototype.size,!0),loopLimit:va(.5,Y.prototype.size,!0),trapezoid:Aa(.5),parallelogram:Aa(1)};Graph.createHandle=fa;Graph.handleFactory=wa;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=wa[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=wa[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),ka=mxUtils.toRadians(-30),sa=mxUtils.getRotatedPoint(sa,Math.cos(ka),Math.sin(ka)),
+ka=mxUtils.toRadians(-150),ta=mxUtils.getRotatedPoint(ta,Math.cos(ka),Math.sin(ka));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=sa.x,m=sa.y,n=ta.x,p=ta.y,q="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=
+k&&null!=g){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);q?(c&&(r=new mxPoint(r.x+l*b,r.y+m*b),e.push(r)),r=new mxPoint(r.x+n*a,r.y+p*a)):(c&&(r=new mxPoint(r.x+n*a,r.y+p*a),e.push(r)),r=new mxPoint(r.x+l*b,r.y+m*b));e.push(r)};var r=g;null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=
+function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Fa.apply(this,arguments)};b.prototype.constraints=[];c.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;y.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=
+mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;
+la.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;Q.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)];H.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),
+!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)];U.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)];l.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)];y.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,
+.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),!1),new mxConnectionConstraint(new mxPoint(.2,.5),!1),new mxConnectionConstraint(new mxPoint(.1,.75),!1),new mxConnectionConstraint(new mxPoint(.9,.25),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.9,.75),!1)];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),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!1),new mxConnectionConstraint(new mxPoint(.875,
.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!1),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)];n.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=
mxRectangleShape.prototype.constraints;m.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;J.prototype.constraints=null;fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.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)];F.prototype.constraints=null;S.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)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0)];mxArrow.prototype.constraints=null;X.prototype.constraints=null;da.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];J.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)];F.prototype.constraints=null;T.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 b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,c=b.editor,d=c.graph,e=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,b){try{var d=mxUtils.parseXml(a),e=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,e);var f=e.getChildren(e.getChildAt(e.getRoot(),0));c.graph.setSelectionCells(c.graph.importCells(f))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@@ -2624,7 +2662,24 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[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(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 r=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return r.apply(this,arguments)}})();
+[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 r=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return r.apply(this,arguments)};
+PrintDialog.prototype.create=function(a,b){function c(){r.value=Math.max(1,Math.min(g,Math.max(parseInt(r.value),parseInt(q.value))));q.value=Math.max(1,Math.min(g,Math.min(parseInt(r.value),parseInt(q.value))))}function d(b){function c(a,b,c){var e=a.getGraphBounds(),f=0,k=0,g=ba.get(),l=1/a.pageScale,m=P.checked;if(m)var l=parseInt(M.value),n=parseInt(T.value),l=Math.min(g.height*n/(e.height/a.view.scale),g.width*l/(e.width/a.view.scale));else l=parseInt(U.value)/(100*a.pageScale),isNaN(l)&&(d=
+1/a.pageScale,U.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);l*=d;!m&&a.pageVisible?(e=a.getPageLayout(),f-=e.x*g.width,k-=e.y*g.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,l,g,0,f,k,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var p=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=p.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,
+null,c,!0)}else{g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=m;b.appendGraph(a,l,f,k,c,!0)}return b}var d=parseInt(Y.value)/100;isNaN(d)&&(d=1,Y.value="100 %");var d=.75*d,f=q.value,k=r.value,g=!n.checked,m=null;g&&(g=f==l&&k==l);if(!g&&null!=a.pages&&a.pages.length){var p=0,g=a.pages.length-1;n.checked||(p=parseInt(f)-1,g=parseInt(k)-1);for(var t=p;t<=g;t++){var u=a.pages[t],f=u==a.currentPage?e:null;if(null==f){var f=a.createTemporaryGraph(e.getStylesheet()),
+k=!0,p=!1,x=null,v=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(k=u.viewState.pageVisible,p=u.viewState.mathEnabled,x=u.viewState.background,v=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(p="0"!=u.mapping.diagramMap.get("mathEnabled"),x=u.mapping.diagramMap.get("background"),v=u.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);f.background=x;f.backgroundImage=null!=v?new mxImage(v.src,
+v.width,v.height):null;f.pageVisible=k;f.mathEnabled=p;var z=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?t+1:z.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(u);f.model.setRoot(u.root)}m=c(f,m,t!=g);f!=e&&f.container.parentNode.removeChild(f.container)}}else m=c(e);m.mathEnabled&&(g=m.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),
+g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),b&&(g.writeln("MathJax.Hub.Queue(function () {"),
+g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&b&&PrintDialog.printPreview(m)}var e=a.editor.graph,f=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,b||mxResources.get("print"));f.appendChild(k);var g=1,l=1,m=document.createElement("div");
+m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","all");n.setAttribute("type","radio");n.setAttribute("name","pages-printdialog");m.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));m.appendChild(k);mxUtils.br(m);var p=n.cloneNode(!0);n.setAttribute("checked","checked");p.setAttribute("value","range");
+m.appendChild(p);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");m.appendChild(k);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";m.appendChild(q);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));m.appendChild(k);var r=q.cloneNode(!0);m.appendChild(r);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(r,
+"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",c);mxEvent.addListener(r,"change",c);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){l=k+1;q.value=l;r.value=l;break}q.setAttribute("max",g);r.setAttribute("max",g);1<g&&f.appendChild(m);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);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));t.appendChild(k);var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="50px";t.appendChild(U);mxEvent.addListener(U,"focus",function(){u.checked=!0});f.appendChild(t);var m=m.cloneNode(!1),P=u.cloneNode(!0);P.setAttribute("value","fit");u.setAttribute("checked","checked");k=document.createElement("div");
+k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(P);m.appendChild(k);t=document.createElement("table");t.style.display="inline-block";var aa=document.createElement("tbody"),S=document.createElement("tr"),C=S.cloneNode(!0),W=document.createElement("td"),K=W.cloneNode(!0),da=W.cloneNode(!0),X=W.cloneNode(!0),O=W.cloneNode(!0),J=W.cloneNode(!0);W.style.textAlign="right";X.style.textAlign="right";mxUtils.write(W,mxResources.get("fitTo"));var M=document.createElement("input");
+M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";K.appendChild(M);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross"));da.appendChild(k);mxUtils.write(X,mxResources.get("fitToBy"));var T=M.cloneNode(!0);O.appendChild(T);mxEvent.addListener(M,"focus",function(){P.checked=!0});mxEvent.addListener(T,"focus",function(){P.checked=!0});k=document.createElement("span");mxUtils.write(k,
+mxResources.get("fitToSheetsDown"));J.appendChild(k);S.appendChild(W);S.appendChild(K);S.appendChild(da);C.appendChild(X);C.appendChild(O);C.appendChild(J);aa.appendChild(S);aa.appendChild(C);t.appendChild(aa);m.appendChild(t);f.appendChild(m);m=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));m.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var ba=PageSetupDialog.addPageFormatPanel(k,
+"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));m.appendChild(k);var Y=document.createElement("input");Y.style.cssText="margin:0 8px 0 8px;";Y.setAttribute("value","100 %");Y.style.width="60px";m.appendChild(Y);f.appendChild(m);k=document.createElement("div");k.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&&k.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),t.className="geBtn",k.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",k.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});t.className=
+"geBtn gePrimaryBtn";k.appendChild(t);a.editor.cancelFirst||k.appendChild(m);f.appendChild(k);this.container=f}})();
(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;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.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;(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=
@@ -2638,8 +2693,8 @@ length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",spee
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),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages),c=null!=k?mxUtils.getXml(k):""}catch(r){}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,e,f,g,t,u,y){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;u=null!=u?u:!0;var k,l=null;null==c||
-c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?k="_blank":l=k=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),m=b.compress(n);if(b.decompress(m)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,m);m=a.ownerDocument.createElement("mxfile");m.appendChild(n)}y?(m=m.cloneNode(!0),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.setAttribute("userAgent",
+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,e,f,g,t,u,x){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;u=null!=u?u:!0;var k,l=null;null==c||
+c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?k="_blank":l=k=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),m=b.compress(n);if(b.decompress(m)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,m);m=a.ownerDocument.createElement("mxfile");m.appendChild(n)}x?(m=m.cloneNode(!0),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.setAttribute("userAgent",
navigator.userAgent),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a));a=mxUtils.getXml(m);if(!f&&!e&&(g||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(m),b,null!=c?c.getTitle():null,k,l);else if(f||!e&&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,t,u,l);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 f=this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=f&&f.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),
f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g,t){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var k=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());
@@ -2653,7 +2708,7 @@ e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![end
!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=
b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);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,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var k=this.getBaseFilename(),g=k+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(g,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,k),this.saveData(g,a,l,"text/html");
-else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(C){this.handleError(C)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):
+else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(D){this.handleError(D)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"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 p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?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 g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(v){this.handleError(v)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
@@ -2669,20 +2724,20 @@ LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(
mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],k=f.data;if(null!=k){var k=this.convertDataUri(k),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,
f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor=
"inherit");g.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";l.appendChild(m);var z=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),
-null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var x=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),v=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=G&&null!=
+null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var y=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),v=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=G&&null!=
G.parentNode&&G.parentNode.removeChild(G),G=m.cloneNode(!1),G.setAttribute("src",Editor.spinImage),G.setAttribute("title",mxResources.get("saving")),G.style.cursor="default",G.style.marginRight="2px",G.style.marginTop="-2px",l.insertBefore(G,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=G&&null!=G.parentNode&&(G.parentNode.removeChild(G),g.style.paddingRight=18*l.childNodes.length+"px")})):null==z&&(z=m.cloneNode(!1),
-z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),l.insertBefore(z,l.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(g.style.paddingRight=18*l.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,f){a=
-x.cloneCells(mxUtils.sortCells(x.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=x.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);v(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?
-(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;H(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&
-(x.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(k.style.border="3px solid transparent",
-null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),
-null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border=
-"3px solid transparent";k.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,g,l,m,n,p,q,r){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,n),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,
-p.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var t=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));f(l,k);b=b.concat(l);v(a);this.spinner.stop();t=!0}catch(Y){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<
-m.length;g++){var l=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(l)),p=this.editor.graph.getBoundingBoxFromGeometry(n);H(n,new mxRectangle(0,0,p.width,p.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!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,
+z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),l.insertBefore(z,l.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(g.style.paddingRight=18*l.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,c,d,f){a=
+y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=y.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);v(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),H=mxUtils.bind(this,function(a){if(y.isSelectionEmpty())y.getRubberband().isActive()?
+(y.getRubberband().execute(a),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=y.getSelectionCells(),c=y.view.getBounds(b),d=y.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=y.view.translate.x;c.y-=y.view.translate.y;E(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.shape&&
+(y.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!1),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&(k.style.border="3px solid transparent",
+null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.graphHandler.shape&&(y.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",y.autoScroll=!0,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!0),
+null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border=
+"3px solid transparent";k.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,g,l,m,n,p,q,r){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,n),c)],c[0].vertex=!0,E(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,
+p.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var t=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));f(l,k);b=b.concat(l);v(a);this.spinner.stop();t=!0}catch(ba){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<
+m.length;g++){var l=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(l)),p=this.editor.graph.getBoundingBoxFromGeometry(n);E(n,new mxRectangle(0,0,p.width,p.height),a)}t=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}}t||(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,
p)&&null!=r?this.parseFile(r,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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();
a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",A);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&A(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var G=null;mxEvent.addListener(m,"click",E)}g.appendChild(l);g.style.paddingRight=18*l.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&
+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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var G=null;mxEvent.addListener(m,"click",H)}g.appendChild(l);g.style.paddingRight=18*l.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=740>=screen.height?5:46,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,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:
@@ -2697,11 +2752,11 @@ EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"
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,e){if(!mxClient.IS_EDGE&&window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(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 f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,
c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(r){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?
-"&base64="+f:"")+(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),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),y=Array(l-k),z=0;k<l;++z,++k)y[z]=c[k].charCodeAt(0);f[g]=new Uint8Array(y)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f){f=null!=f?f:!1;e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,
+"&base64="+f:"")+(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),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),x=Array(l-k),z=0;k<l;++z,++k)x[z]=c[k].charCodeAt(0);f[g]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f){f=null!=f?f:!1;e=!mxClient.IS_IOS||!navigator.standalone;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)f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=
-window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(y){this.handleError(y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,e,null,null,f?3:4);this.showDialog(b.container,380,this.getServiceCount(f)-1<(f?4:5)?270:390,!0,!0);
+window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,e,null,null,f?3:4);this.showDialog(b.container,380,this.getServiceCount(f)-1<(f?4:5)?270:390,!0,!0);
b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||
-"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,
+"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(x){this.handleError(x)}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,d,null,null,4);this.showDialog(a.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,u){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;k=b?null:this.editor.graph.background;
k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u));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(m,"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,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");
@@ -2710,32 +2765,32 @@ mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("sele
"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",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=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 f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=
b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.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&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.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="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,u,y,z){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=
-e);"auto"!==d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),l.toolbar=c.join(" "));y&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+
+null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,u,x,z){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=
+e);"auto"!==d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),l.toolbar=c.join(" "));x&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+
(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+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 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 l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.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")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),x=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
-":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(e,mxResources.get("allPages"),g,!g),E=this.addCheckbox(e,mxResources.get("layers"),!0),G=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),
-!0);C.style.marginLeft="24px";C.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,x.checked,A.value,n.getTarget(),n.getColor(),v.checked,H.checked,E.checked,G.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");
+document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),y=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(e,mxResources.get("allPages"),g,!g),H=this.addCheckbox(e,mxResources.get("layers"),!0),G=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),
+!0);D.style.marginLeft="24px";D.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,y.checked,A.value,n.getTarget(),n.getColor(),v.checked,E.checked,H.checked,G.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");
g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="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(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.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!=c||null!=d)a+=30,mxUtils.write(g,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%",g.appendChild(p),mxUtils.write(g,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",g.appendChild(q),mxUtils.br(g);var v=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var H=null;
-if(null==l||l.constructor!=window.DriveFile||b)H=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(g,mxResources.get("lightbox"),!0),G=this.addCheckbox(g,mxResources.get("showEditButton"),!0);G.style.marginLeft="24px";var C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=G.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?(C.removeAttribute("disabled"),G.removeAttribute("disabled")):(C.setAttribute("disabled",
-"disabled"),G.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.getTarget(),v.getColor(),null==H?!0:H.checked,E.checked,G.checked,C.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,
+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%",g.appendChild(p),mxUtils.write(g,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",g.appendChild(q),mxUtils.br(g);var v=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var E=null;
+if(null==l||l.constructor!=window.DriveFile||b)E=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var H=this.addCheckbox(g,mxResources.get("lightbox"),!0),G=this.addCheckbox(g,mxResources.get("showEditButton"),!0);G.style.marginLeft="24px";var D=this.addCheckbox(g,mxResources.get("layers"),!0);D.style.marginLeft=G.style.marginLeft;D.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?(D.removeAttribute("disabled"),G.removeAttribute("disabled")):(D.setAttribute("disabled",
+"disabled"),G.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.getTarget(),v.getColor(),null==E?!0:E.checked,H.checked,G.checked,D.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):v.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 g=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,
function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.whiteSpace="nowrap";var l=this.editor.graph,m=280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";k.appendChild(n);mxUtils.write(k,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="100%";k.appendChild(p);mxUtils.write(k,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="0";k.appendChild(q);mxUtils.br(k);var r=this.addCheckbox(k,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==
-l.background),H=this.addCheckbox(k,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");f&&(k.appendChild(E),mxUtils.write(k,mxResources.get("crop")),mxUtils.br(k),m+=26);l.isSelectionEmpty()?E.setAttribute("disabled","disabled"):(E.setAttribute("checked","checked"),E.defaultChecked=!0);var G=this.addCheckbox(k,mxResources.get("shadow"),l.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&&(k.appendChild(C),mxUtils.write(k,mxResources.get("embedImages")),mxUtils.br(k),m+=26);var B=this.addCheckbox(k,mxResources.get("includeCopyOfMyDiagram"),g),F=null!=this.pages&&1<this.pages.length,I=I=this.addCheckbox(k,F?mxResources.get("allPages"):"",F,!F);I.style.marginLeft="24px";I.style.marginBottom="16px";F||(I.style.visibility=
-"hidden");mxEvent.addListener(B,"change",function(){B.checked&&F?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});g&&F||I.setAttribute("disabled","disabled");a=new CustomDialog(this,k,mxUtils.bind(this,function(){e(p.value,r.checked,!H.checked,G.checked,B.checked,C.checked,q.value,E.checked,!I.checked)}),null,c,d);this.showDialog(a.container,320,m,!0,!0);p.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};
+l.background),E=this.addCheckbox(k,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),H=document.createElement("input");H.style.marginTop="16px";H.style.marginRight="8px";H.setAttribute("type","checkbox");f&&(k.appendChild(H),mxUtils.write(k,mxResources.get("crop")),mxUtils.br(k),m+=26);l.isSelectionEmpty()?H.setAttribute("disabled","disabled"):(H.setAttribute("checked","checked"),H.defaultChecked=!0);var G=this.addCheckbox(k,mxResources.get("shadow"),l.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&&(k.appendChild(D),mxUtils.write(k,mxResources.get("embedImages")),mxUtils.br(k),m+=26);var B=this.addCheckbox(k,mxResources.get("includeCopyOfMyDiagram"),g),F=null!=this.pages&&1<this.pages.length,I=I=this.addCheckbox(k,F?mxResources.get("allPages"):"",F,!F);I.style.marginLeft="24px";I.style.marginBottom="16px";F||(I.style.visibility=
+"hidden");mxEvent.addListener(B,"change",function(){B.checked&&F?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});g&&F||I.setAttribute("disabled","disabled");a=new CustomDialog(this,k,mxUtils.bind(this,function(){e(p.value,r.checked,!E.checked,G.checked,B.checked,D.checked,q.value,H.checked,!I.checked)}),null,c,d);this.showDialog(a.container,320,m,!0,!0);p.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};
EditorUi.prototype.showExportJpgDialog=function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";
f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);
-mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),d.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");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,
-!k.checked,y.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var v=1<g.model.getChildCount(g.model.getRoot()),H=this.addCheckbox(f,mxResources.get("layers"),v,!v);H.style.marginLeft=A.style.marginLeft;H.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?
-(v&&H.removeAttribute("disabled"),A.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,A.checked,H.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" 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"+
+mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var x=this.addCheckbox(c,mxResources.get("shadow"),d.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");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,
+!k.checked,x.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var v=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),v,!v);E.style.marginLeft=A.style.marginLeft;E.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?
+(v&&E.removeAttribute("disabled"),A.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,A.checked,E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" 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"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=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");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="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"+
@@ -2743,15 +2798,15 @@ EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.grap
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(k.getAttribute("width")),b=parseInt(k.getAttribute("height")),k.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",k.removeAttribute("height")),""!=q&&k.setAttribute("style",q),g(mxUtils.getXml(k))};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.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=b.background;g==mxConstants.NONE&&(g=null);b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=
c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((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,e,f,g,
-t,u){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,t):null,u)}catch(x){"Invalid image"==x.message?this.downloadFile(u):this.handleError(x)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
-this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,t,u,y,z,x,A,v){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;A=null!=A?A:0;var k=u?null:x.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==u&&(k="#ffffff");this.convertImages(x.getSvg(k,null,null,v,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),
-g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));t=null!=t?t:1;null!=b&&(t=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(t*g)+2*A;l=Math.ceil(t*l)+2*A;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(t,t);m.drawImage(d,A/t,A/t);a(e)});d.onerror=function(a){null!=e&&e(a)};try{y&&this.editor.graph.addSvgShadow(c),this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=
-this.createSvgDataUri(mxUtils.getXml(c))}))}catch(C){null!=e&&e(C)}}),c,z)};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,
+t,u){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,t):null,u)}catch(y){"Invalid image"==y.message?this.downloadFile(u):this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,t,u,x,z,y,A,v){f=null!=f?f:!0;y=null!=y?y:this.editor.graph;A=null!=A?A:0;var k=u?null:y.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==u&&(k="#ffffff");this.convertImages(y.getSvg(k,null,null,v,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),
+g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));t=null!=t?t:1;null!=b&&(t=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(t*g)+2*A;l=Math.ceil(t*l)+2*A;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(t,t);m.drawImage(d,A/t,A/t);a(e)});d.onerror=function(a){null!=e&&e(a)};try{x&&this.editor.graph.addSvgShadow(c),this.convertMath(y,c,!0,mxUtils.bind(this,function(){d.src=
+this.createSvgDataUri(mxUtils.getXml(c))}))}catch(D){null!=e&&e(D)}}),c,z)};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 k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};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,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),l=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var m=l.getElementsByTagName("diagram");if(1==m.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){g.model.beginUpdate();try{for(var n=0;n<m.length;n++){var p=this.updatePageRoot(new DiagramPage(m[n])),
-A=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,p,p,A))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var v=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,v);var H=v.getChildCount(v.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<H;n++){var E=v.getChildAt(v.getRoot(),n);if(1!=H||g.isCellLocked(g.getDefaultParent()))E=g.importCells([E],0,0,g.model.getRoot(),
-null,a)[0],G=g.model.getChildren(E),g.moveCells(G,b,c),f=f.concat(G);else var G=v.getChildren(E),f=f.concat(g.importCells(G,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(B){throw e||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
+A=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,p,p,A))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var v=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,v);var E=v.getChildCount(v.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<E;n++){var H=v.getChildAt(v.getRoot(),n);if(1!=E||g.isCellLocked(g.getDefaultParent()))H=g.importCells([H],0,0,g.model.getRoot(),
+null,a)[0],G=g.model.getChildren(H),g.moveCells(G,b,c),f=f.concat(G);else var G=v.getChildren(H),f=f.concat(g.importCells(G,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(B){throw e||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
b,c,d)}catch(q){}});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.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!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()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,
26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(z){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
@@ -2759,87 +2814,87 @@ this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.
null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var k=null,m;for(m in e.Pages)if(l=e.Pages[m],null!=l&&"0"==l.Properties.Order){k=l;break}null!=
k&&this.insertLucidChart(k,b,c,f)}else{g=this.editor.graph;f=null;g.getModel().beginUpdate();try{f=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=a,g.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)&&
g.setLinkForCell(f,f.value),f.geometry.width+=g.gridSize,f.geometry.height+=g.gridSize}finally{g.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,e,f,g,t,u,y,z){y=null!=y?y:!0;var k=!1,l=null;"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,y),u=!0)),u||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,
-b)+a.substring(a.indexOf(",",b+1))),y&&l.isGridEnabled()&&(c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(k=!0,this.parseFile(null!=u?u: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!=g&&".vssx"==g.toLowerCase().substring(g.length-5)&&(g=g.substring(0,g.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,g))):b=this.importXml(a,c,d,y));null!=t&&t(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,y));k||null==t||t(l);return l};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>>
+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,e,f,g,t,u,x,z){x=null!=x?x:!0;var k=!1,l=null;"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,x),u=!0)),u||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,
+b)+a.substring(a.indexOf(",",b+1))),x&&l.isGridEnabled()&&(c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(k=!0,this.parseFile(null!=u?u: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!=g&&".vssx"==g.toLowerCase().substring(g.length-5)&&(g=g.substring(0,g.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,g))):b=this.importXml(a,c,d,x));null!=t&&t(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x));k||null==t||t(l);return l};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,e,f,g,t,u,y,z,x){var k=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;y=null!=y?y:this.maxImageBytes;u=null!=u?u:!0;var l=this.editor.graph,
-m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,l,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,l,m,k,x)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],r=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=t)t(q);else{var c=[];l.getModel().beginUpdate();
-try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),F=0;F<n;F++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],t=x?null:p.getAttribute("content");null!=t&&
+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,e,f,g,t,u,x,z,y){var k=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;u=null!=u?u:!0;var l=this.editor.graph,
+m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,l,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,l,m,k,y)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],r=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=t)t(q);else{var c=[];l.getModel().beginUpdate();
+try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),F=0;F<n;F++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],t=y?null:p.getAttribute("content");null!=t&&
"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?r(f,mxUtils.bind(this,function(){try{if(l.substring(0,n+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var g=a[0],p=parseFloat(g.getAttribute("width")),r=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox",
-"0 0 "+p+" "+r);else if(isNaN(p)||isNaN(r)){var u=t.split(" ");3<u.length&&(p=parseFloat(u[2]),r=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var y=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,r));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*y)),Math.max(1,Math.round(r*y)),k.name)}}}catch(Q){}return null})):r(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var v=x?null:this.extractGraphModelFromPng(a.target.result);
+"0 0 "+p+" "+r);else if(isNaN(p)||isNaN(r)){var u=t.split(" ");3<u.length&&(p=parseFloat(u[2]),r=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,r));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*v)),Math.max(1,Math.round(r*v)),k.name)}}}catch(Q){}return null})):r(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var v=y?null:this.extractGraphModelFromPng(a.target.result);
if(null!=v&&0<v.length){var A=new Image;A.src=a.target.result;r(f,mxUtils.bind(this,function(){return e(v,"text/xml",b+f*m,c+f*m,A.width,A.height,k.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(g){this.resizeImage(g,
-a.target.result,mxUtils.bind(this,function(g,l,n){r(f,mxUtils.bind(this,function(){if(null!=g&&g.length<y){var p=u&&this.isResampleImage(a.target.result)?Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,d,z)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)?
+a.target.result,mxUtils.bind(this,function(g,l,n){r(f,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var p=u&&this.isResampleImage(a.target.result)?Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,d,z)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)?
e(null,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})},k):"image"==k.type.substring(0,5)?l.readAsDataURL(k):l.readAsText(k)})(F)};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,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),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 v=document.createElement("canvas");v.width=m;v.height=n;var H=v.toDataURL();q!==H&&(b=q,g=m,k=n)}}}catch(E){}c(b,g,k)};EditorUi.prototype.crcTable=[];
+function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),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 v=document.createElement("canvas");v.width=m;v.height=n;var E=v.toDataURL();q!==E&&(b=q,g=m,k=n)}}}catch(H){}c(b,g,k)};EditorUi.prototype.crcTable=[];
for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=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,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(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(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var m=g(a);if("IDAT"==f(a,4)){e=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);e+=k(c.length)+b+c+k(d^4294967295);
e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+m);d=f(a,m);f(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);
-var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.graph.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var c=a.getGlobalVariable;a.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:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=
-c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){var f=function(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.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||a.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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(B){}}),!1);var g=document.createElement("div");g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.contentEditable=!0;mxUtils.setOpacity(g,
-0);g.style.width="1px";g.style.height="1px";g.innerHTML="&nbsp;";var r=!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 c=mxEvent.getSource(b);null==a.container||!a.isEnabled()||a.isMouseDown||a.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||
-r||(g.style.left=a.container.scrollLeft+10+"px",g.style.top=a.container.scrollTop+10+"px",a.container.appendChild(g),r=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){g.focus();document.execCommand("selectAll",!1,null)},0):(g.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!r||224!=c&&17!=c&&91!=c||(r=!1,a.isEditing()||null!=this.dialog||null==a.container||a.container.focus(),
-g.parentNode.removeChild(g))}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(g),f())}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(g,!0),f())}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,g);g.innerHTML="&nbsp;"}),0))}),
-!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==g?!0:t.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.test){d=document.getElementById("geFooter");null!=d&&(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)})),d.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 u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:u.apply(this,arguments)}}d=document.getElementById("geInfo");null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var y=
-null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=y&&(y.parentNode.removeChild(y),y=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){null==y&&(!mxClient.IS_IE||10<document.documentMode)&&(y=this.highlightElement(a.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=y&&(y.parentNode.removeChild(y),
-y=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.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 k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=
-k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=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,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,
-f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};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.insertLucidChart(JSON.parse(d)),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(u){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(u){}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(u){}}}}};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){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(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);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){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=
-0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?
-this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,
-d)});b.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)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};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()?(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"))}))):e())};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)};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.showLayersDialog()):(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(I){}return a}var l=f.data;if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(F){l=null}if(null==l)return;
-if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var m=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?
-mxResources.get(l.titleKey):l.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==l.action){m=null;m="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):k(l.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(F){g.postMessage(JSON.stringify({event:"draft",error:F.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=
-l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,
-r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data=a;g.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);r(a)});if(this.isExportToCanvas()){if(null!=
-this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),G=q.getGlobalVariable,C=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:G.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(C.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,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
-("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=
-this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),
-"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),
-this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
-"12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}l=k(l);c=!0;try{a(l,f)}catch(F){this.handleError(F)}c=!1;null!=
-urlParams.modified&&this.editor.setStatus("");var B=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=B();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=B();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),
-"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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")+" (Ctrl+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,f=null,g="auto",k="auto",u=40,y=40,z=0,x=this.editor.graph;x.getGraphBounds();for(var A=function(){x.setSelectionCells(O);x.scrollCellToVisible(x.getSelectionCell())},v=x.getFreeInsertPoint(),H=v.x,E=v.y,v=E,G=null,C="auto",B=[],F=null,I=null,N=0;N<b.length&&"#"==b[N].charAt(0);){a=b[N];for(N++;N<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[N].substring(1)),N++;if("#"!=a.charAt(1)){var M=a.indexOf(":");
-if(0<M){var U=mxUtils.trim(a.substring(1,M)),P=mxUtils.trim(a.substring(M+1));"label"==U?G=x.sanitizeHtml(P):"style"==U?e=P:"identity"==U&&0<P.length&&"-"!=P?f=P:"width"==U?g=P:"height"==U?k=P:"ignore"==U?I=P.split(","):"connect"==U?B.push(JSON.parse(P)):"link"==U?F=P:"padding"==U?z=parseFloat(P):"edgespacing"==U?u=parseFloat(P):"nodespacing"==U?y=parseFloat(P):"layout"==U&&(C=P)}}}var ba=this.editor.csvToArray(b[N]);a=null;if(null!=f)for(var T=0;T<ba.length;T++)if(f==ba[T]){a=T;break}null==G&&(G=
-"%"+ba[0]+"%");if(null!=B)for(var D=0;D<B.length;D++)null==d[B[D].to]&&(d[B[D].to]={});x.model.beginUpdate();try{for(T=N+1;T<b.length;T++){var ca=this.editor.csvToArray(b[T]);if(ca.length==ba.length){var L=null,J=null!=a?ca[a]:null;null!=J&&(L=x.model.getCell(J));null==L&&(L=new mxCell(G,new mxGeometry(H,v,0,0),e||"whiteSpace=wrap;html=1;"),L.vertex=!0,L.id=J);for(var X=0;X<ca.length;X++)x.setAttributeForCell(L,ba[X],ca[X]);x.setAttributeForCell(L,"placeholders","1");L.style=x.replacePlaceholders(L,
-L.style);for(D=0;D<B.length;D++)d[B[D].to][L.getAttribute(B[D].to)]=L;null!=F&&"link"!=F&&(x.setLinkForCell(L,L.getAttribute(F)),x.setAttributeForCell(L,F,null));var fa=this.editor.graph.getPreferredSizeForCell(L);L.geometry.width="auto"==g?fa.width+z:parseFloat(g);L.geometry.height="auto"==k?fa.height+z:parseFloat(k);v+=L.geometry.height+y;c.push(x.addCell(L))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var K=c.slice(),O=c.slice(),D=0;D<B.length;D++)for(var S=B[D],T=0;T<
-c.length;T++){var L=c[T],Y=L.getAttribute(S.from);if(null!=Y){x.setAttributeForCell(L,S.from,null);for(var aa=Y.split(","),X=0;X<aa.length;X++){var Q=d[S.to][aa[X]];null!=Q&&(O.push(x.insertEdge(null,null,S.label||"",S.invert?Q:L,S.invert?L:Q,S.style||x.createCurrentEdgeStyle())),mxUtils.remove(S.invert?L:Q,K))}}}if(null!=I)for(T=0;T<c.length;T++)for(L=c[T],X=0;X<I.length;X++)x.setAttributeForCell(L,mxUtils.trim(I[X]),null);var W=new mxParallelEdgeLayout(x);W.spacing=u;var Z=function(){W.execute(x.getDefaultParent());
-for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==g&&(b.width=Math.round(x.snap(b.width)));"auto"==k&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==C){var R=new mxCircleLayout(x);R.resetEdges=!1;var V=R.isVertexIgnored;R.isVertexIgnored=function(a){return V.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){R.execute(x.getDefaultParent());Z()},!0,A);A=null}else if("horizontaltree"==C||"verticaltree"==
-C||"auto"==C&&O.length==2*c.length-1&&1==K.length){x.view.validate();var ga=new mxCompactTreeLayout(x,"horizontaltree"==C);ga.levelDistance=y;ga.edgeRouting=!1;this.executeLayout(function(){ga.execute(x.getDefaultParent(),0<K.length?K[0]:null)},!0,A);A=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==K.length){x.view.validate();var da=new mxHierarchicalLayout(x,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);da.intraCellSpacing=y;this.executeLayout(function(){da.execute(x.getDefaultParent(),
-O);x.moveCells(O,H,E)},!0,A);A=null}else if("organic"==C||"auto"==C&&O.length>c.length){x.view.validate();var ha=new mxFastOrganicLayout(x);ha.forceConstant=3*y;ha.resetEdges=!1;var la=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};W=new mxParallelEdgeLayout(x);W.spacing=u;this.executeLayout(function(){ha.execute(x.getDefaultParent());Z()},!0,A);A=null}this.hideDialog()}finally{x.model.endUpdate()}null!=A&&A()}}catch(ma){this.handleError(ma)}};
-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(" "),
+var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.graph.addSvgShadow(a.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 c=a.getGlobalVariable;a.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:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){var f=function(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.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||a.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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(B){}}),!1);var g=document.createElement("div");
+g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.contentEditable=!0;mxUtils.setOpacity(g,0);g.style.width="1px";g.style.height="1px";g.innerHTML="&nbsp;";var r=!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 c=mxEvent.getSource(b);null==a.container||!a.isEnabled()||a.isMouseDown||a.isEditing()||
+null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||r||(g.style.left=a.container.scrollLeft+10+"px",g.style.top=a.container.scrollTop+10+"px",a.container.appendChild(g),r=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){g.focus();document.execCommand("selectAll",!1,null)},0):(g.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=
+b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!r||224!=c&&17!=c&&91!=c||(r=!1,a.isEditing()||null!=this.dialog||null==a.container||a.container.focus(),g.parentNode.removeChild(g))}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(g),f())}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(g,!0),f())}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&
+(g.innerHTML="&nbsp;",g.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,g);g.innerHTML="&nbsp;"}),0))}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==g?!0:t.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.test){d=document.getElementById("geFooter");
+null!=d&&(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)})),d.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 u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:u.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var x=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=x&&(x.parentNode.removeChild(x),x=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){null==x&&(!mxClient.IS_IE||10<document.documentMode)&&(x=this.highlightElement(a.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=x&&(x.parentNode.removeChild(x),x=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.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 k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=
+e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=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,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};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.insertLucidChart(JSON.parse(d)),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(u){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(u){}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(u){}}}}};
+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){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(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);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){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+
+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==
+a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,d)});b.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)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};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()?(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"))}))):e())};
+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)};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.showLayersDialog()):
+(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(I){}return a}var l=f.data;
+if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(F){l=null}if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var m=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=
+a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==l.action){m=null;m="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):k(l.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(F){g.postMessage(JSON.stringify({event:"draft",error:F.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();
+m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):
+null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?
+l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data=a;g.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);
+r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),G=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:G.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(D.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,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=
+this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,
+null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),
+"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),
+mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),
+"*");return}}l=k(l);c=!0;try{a(l,f)}catch(F){this.handleError(F)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var B=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=B();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=B();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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")+" (Ctrl+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,f=null,g="auto",k="auto",u=40,x=40,z=0,y=this.editor.graph;y.getGraphBounds();for(var A=function(){y.setSelectionCells(M);y.scrollCellToVisible(y.getSelectionCell())},v=y.getFreeInsertPoint(),E=v.x,H=v.y,v=H,G=null,D="auto",B=[],F=null,I=null,N=0;N<b.length&&"#"==b[N].charAt(0);){a=b[N];for(N++;N<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[N].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(b[N].substring(1)),N++;if("#"!=a.charAt(1)){var L=a.indexOf(":");if(0<L){var U=mxUtils.trim(a.substring(1,L)),P=mxUtils.trim(a.substring(L+1));"label"==U?G=y.sanitizeHtml(P):"style"==U?e=P:"identity"==U&&0<P.length&&"-"!=P?f=P:"width"==U?g=P:"height"==U?k=P:"ignore"==U?I=P.split(","):"connect"==U?B.push(JSON.parse(P)):"link"==U?F=P:"padding"==U?z=parseFloat(P):"edgespacing"==U?u=parseFloat(P):"nodespacing"==U?x=parseFloat(P):"layout"==U&&(D=P)}}}var aa=this.editor.csvToArray(b[N]);
+a=null;if(null!=f)for(var S=0;S<aa.length;S++)if(f==aa[S]){a=S;break}null==G&&(G="%"+aa[0]+"%");if(null!=B)for(var C=0;C<B.length;C++)null==d[B[C].to]&&(d[B[C].to]={});y.model.beginUpdate();try{for(S=N+1;S<b.length;S++){var W=this.editor.csvToArray(b[S]);if(W.length==aa.length){var K=null,da=null!=a?W[a]:null;null!=da&&(K=y.model.getCell(da));null==K&&(K=new mxCell(G,new mxGeometry(E,v,0,0),e||"whiteSpace=wrap;html=1;"),K.vertex=!0,K.id=da);for(var X=0;X<W.length;X++)y.setAttributeForCell(K,aa[X],
+W[X]);y.setAttributeForCell(K,"placeholders","1");K.style=y.replacePlaceholders(K,K.style);for(C=0;C<B.length;C++)d[B[C].to][K.getAttribute(B[C].to)]=K;null!=F&&"link"!=F&&(y.setLinkForCell(K,K.getAttribute(F)),y.setAttributeForCell(K,F,null));var O=this.editor.graph.getPreferredSizeForCell(K);K.geometry.width="auto"==g?O.width+z:parseFloat(g);K.geometry.height="auto"==k?O.height+z:parseFloat(k);v+=K.geometry.height+x;c.push(y.addCell(K))}}null==e&&y.fireEvent(new mxEventObject("cellsInserted","cells",
+c));for(var J=c.slice(),M=c.slice(),C=0;C<B.length;C++)for(var T=B[C],S=0;S<c.length;S++){var K=c[S],ba=K.getAttribute(T.from);if(null!=ba){y.setAttributeForCell(K,T.from,null);for(var Y=ba.split(","),X=0;X<Y.length;X++){var Q=d[T.to][Y[X]];null!=Q&&(M.push(y.insertEdge(null,null,T.label||"",T.invert?Q:K,T.invert?K:Q,T.style||y.createCurrentEdgeStyle())),mxUtils.remove(T.invert?K:Q,J))}}}if(null!=I)for(S=0;S<c.length;S++)for(K=c[S],X=0;X<I.length;X++)y.setAttributeForCell(K,mxUtils.trim(I[X]),null);
+var Z=new mxParallelEdgeLayout(y);Z.spacing=u;var ca=function(){Z.execute(y.getDefaultParent());for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==g&&(b.width=Math.round(y.snap(b.width)));"auto"==k&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==D){var R=new mxCircleLayout(y);R.resetEdges=!1;var V=R.isVertexIgnored;R.isVertexIgnored=function(a){return V.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){R.execute(y.getDefaultParent());
+ca()},!0,A);A=null}else if("horizontaltree"==D||"verticaltree"==D||"auto"==D&&M.length==2*c.length-1&&1==J.length){y.view.validate();var ga=new mxCompactTreeLayout(y,"horizontaltree"==D);ga.levelDistance=x;ga.edgeRouting=!1;this.executeLayout(function(){ga.execute(y.getDefaultParent(),0<J.length?J[0]:null)},!0,A);A=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==J.length){y.view.validate();var ea=new mxHierarchicalLayout(y,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
+ea.intraCellSpacing=x;this.executeLayout(function(){ea.execute(y.getDefaultParent(),M);y.moveCells(M,E,H)},!0,A);A=null}else if("organic"==D||"auto"==D&&M.length>c.length){y.view.validate();var ha=new mxFastOrganicLayout(y);ha.forceConstant=3*x;ha.resetEdges=!1;var la=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};Z=new mxParallelEdgeLayout(y);Z.spacing=u;this.executeLayout(function(){ha.execute(y.getDefaultParent());ca()},!0,A);A=null}this.hideDialog()}finally{y.model.endUpdate()}null!=
+A&&A()}}catch(ma){this.handleError(ma)}};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};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.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*
@@ -2848,16 +2903,17 @@ null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.back
("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 c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.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);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 d=applicationCache;if(null!=d&&null==this.offlineStatus){var e=function(a){switch(a){case d.UNCACHED:return"";case d.IDLE:return'<img title="Cached" border="0" src="'+
-IMAGE_PATH+'/checkmark.gif"/>';case d.CHECKING:return'<img title="Checking..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.DOWNLOADING:return'<img title="Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.UPDATEREADY:return'<img title="Update ready" border="0" src="'+IMAGE_PATH+'/download.png"/>';case d.OBSOLETE:return'<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';default:return'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}};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);d=window.applicationCache;
-b=mxUtils.bind(this,function(){this.offlineStatus.innerHTML=e(d.status)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").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&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);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.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==
-c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*e/g.view.scale),n=Math.floor(l.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;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,c){this.ui=a;this.page=b;this.previous=c}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,c){this.ui=a;this.oldIndex=b;this.newIndex=c}
-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))}
+IMAGE_PATH+'/checkmark.gif"/>';case d.CHECKING:return'<img title="Checking/Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.DOWNLOADING:return'<img title="Checking/Downloading..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';case d.UPDATEREADY:return'<img title="Update ready" border="0" src="'+IMAGE_PATH+'/download.png"/>';case d.OBSOLETE:return'<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';default:return'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}};
+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"))}));d=window.applicationCache;b=mxUtils.bind(this,function(){var a=e(d.status);this.offlineStatus.innerHTML!=a&&(this.offlineStatus.innerHTML=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",
+b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=
+b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").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&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);
+this.actions.get("createRevision").setEnabled(c);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.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*e/g.view.scale),
+n=Math.floor(l.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;
+DiagramPage.prototype.viewState=null;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,c){this.ui=a;this.page=b;this.previous=c}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,c){this.ui=a;this.oldIndex=b;this.newIndex=c}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))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,c=b.graph,d=b.graph.compress(c.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=c.getViewState();a.root=c.model.root;c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.rootChanged(a.root);c.setViewState(a.viewState);
b.fireEvent(new mxEventObject("setViewState","change",this));c.gridEnabled=c.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);b.updateGraphComponents();c.view.validate();c.sizeDidChange();this.neverShown&&(this.neverShown=!1,c.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,c,d){SelectPage.call(this,a,c);this.relatedPage=b;this.index=d;this.previousIndex=null}
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)};
@@ -2897,7 +2953,8 @@ EditorUi.prototype.createTabForPage=function(a,b,c){c=this.createTab(c);var d=a.
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var c=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,e=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;e=a==this.currentPage;c.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(c.isEnabled()&&!c.isMouseDown&&(mxEvent.isTouchEvent(f)&&e||mxEvent.isPopupTrigger(f))){c.popupMenuHandler.hideMenu();
this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!d){var g=new mxPopupMenu(this.createPageMenu(a));g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);this.resetCurrentMenu();g.destroy()});var k=mxEvent.getClientX(f),l=mxEvent.getClientY(f);g.popup(k,l,null,f);this.setCurrentMenu(g,b)}mxEvent.consume(f)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(c,d){c.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);c.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);c.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);c.addSeparator(d);c.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
-mxResources.get("copyOf",[a.getName()]))}),d)})};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;
+mxResources.get("copyOf",[a.getName()]))}),d)})};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\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.\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\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\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\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 Work\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\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)\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\ngeneral=General\ngithub=GitHub\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=Descrease 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.\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\nloveApp=I love draw.io\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\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\npublishConfirmation=This will make your diagram public on imgur.com.\npublished=Published\npublishedAt=Published at {1}\npublishing=Publishing\ndeleteUrl=Link to delete: {1}\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\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\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\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\nshowEditButton=Show Edit Button\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\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,c){this.init(a,b,c)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/?client=1";GraphViewer.prototype.editBlankFallbackUrl="https://www.draw.io/?create=drawdata&splash=0";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,c){this.graphConfig=null!=c?c:{};this.autoFit=null!=c["auto-fit"]?c["auto-fit"]:this.autoFit;this.allowZoomIn=null!=c["allow-zoom-in"]?c["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=c["check-visible-state"]?c["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,
@@ -2924,16 +2981,16 @@ c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.background
0);d=null;e=window.setTimeout(mxUtils.bind(this,function(){c.style.display="none";e=null}),100)}),a||200)}),g=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);c.style.display="";mxUtils.setOpacity(c,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(g(30),f())}));mxEvent.addListener(c,mxClient.IS_POINTER?"pointermove":
"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){g(100)}));mxEvent.addListener(c,"mousemove",mxUtils.bind(this,function(a){g(100);mxEvent.consume(a)}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var k=this.graph,l=k.getTolerance();k.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}for(var m=this.toolbarItems,n=0,p=null,q=null,r=0;r<m.length;r++){var t=m[r];if("pages"==t){var u=[],q=b.ownerDocument.createElement("div");
-q.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(q,70);var y=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,u.length);q.innerHTML="";mxUtils.write(q,this.currentPage+1+" / "+u.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(u[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
-"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";c.appendChild(q);var z=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,u.length);q.innerHTML="";mxUtils.write(q,this.currentPage+1+" / "+u.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(u[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");z.style.paddingLeft="0px";z.style.paddingRight=
-"0px";var x=null,t=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)u=[];this.xmlNode!=x&&(u=this.xmlNode.getElementsByTagName("diagram"),q.innerHTML="",mxUtils.write(q,this.currentPage+1+" / "+u.length),x=this.xmlNode);q.style.display=1<u.length?"inline-block":"none";y.style.display=q.style.display;z.style.display=q.style.display});this.addListener("xmlNodeChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+q.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(q,70);var x=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,u.length);q.innerHTML="";mxUtils.write(q,this.currentPage+1+" / "+u.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(u[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
+"Previous Page");x.style.borderRightStyle="none";x.style.paddingLeft="0px";x.style.paddingRight="0px";c.appendChild(q);var z=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,u.length);q.innerHTML="";mxUtils.write(q,this.currentPage+1+" / "+u.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(u[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");z.style.paddingLeft="0px";z.style.paddingRight=
+"0px";var y=null,t=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)u=[];this.xmlNode!=y&&(u=this.xmlNode.getElementsByTagName("diagram"),q.innerHTML="",mxUtils.write(q,this.currentPage+1+" / "+u.length),y=this.xmlNode);q.style.display=1<u.length?"inline-block":"none";x.style.display=q.style.display;z.style.display=q.style.display});this.addListener("xmlNodeChanged",t);t()}else if("zoom"==t)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"==t){if(this.layersEnabled){var A=this.graph.getModel(),v=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=v.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");A.addListener(mxEvent.CHANGE,function(){v.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});v.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
(t=this.graphConfig["toolbar-buttons"][t],null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(m=b.ownerDocument.createElement("div"),m.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;",m.setAttribute("title",this.graphConfig.title),mxUtils.write(m,
-this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var H=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
-b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==H&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
-p=null),b.style.border=H)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
+this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var E=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
+b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
+p=null),b.style.border=E)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,function(c){null!=b&&(c=mxEvent.getSource(c).getAttribute("href"),null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||b.destroy())},mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"&layers=1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://www.draw.io/?client=1&lightbox=1&close=1&edit=_blank"+
a)}else window.drawdata=this.xml,window.open("https://www.draw.io/?client=1&lightbox=1&edit=_blank"+a)}else this.showLocalLightbox()};
@@ -2941,16 +2998,17 @@ GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScro
var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(c.style.position="absolute",c.style.right="32px",c.style.top=a.y+32+"px"):c.style.cssText="position:fixed;top:32px;right:32px;";c.style.cursor="pointer";mxEvent.addListener(c,"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);Graph.prototype.shadowId="dropShadow";d.refresh=function(){};mxEvent.addListener(b,"click",function(){d.destroy()});d.editor.editBlankUrl=this.editBlankUrl;
d.editor.editBlankFallbackUrl=this.editBlankFallbackUrl;var e=d.editor.getEditBlankUrl;d.editor.getEditBlankUrl=function(a,b){var c="";if(null!=d.pages&&null!=d.currentPage){var f=mxUtils.indexOf(d.pages,d.currentPage);0<f&&(c="&page="+f)}return e.apply(this,arguments)+c};var f=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),g=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",f);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow=
-"auto";GraphViewer.resizeSensorEnabled=!0;g.apply(this,arguments)};var k=d.editor.graph,l=k.container;l.style.overflow="hidden";this.lightboxChrome?(l.style.border="1px solid #c0c0c0",l.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(b.style.display="none",c.style.display="none");var m=this;k.getImageFromBundles=function(a){return m.getImageUrl(a)};this.graphConfig.move&&(k.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(l.style,
-"border-radius","4px"),l.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(l.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(l.style,"transition","all .25s ease-in-out"));this.addClickHandler(k,d);window.setTimeout(mxUtils.bind(this,function(){l.style.outline="none";l.style.zIndex=this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(l);document.body.appendChild(c);d.setFileData(this.xml);
-mxUtils.setPrefixedStyle(l.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&&(l.style.position="absolute",l.style.display="block",l.style.left=a.x+"px",l.style.top=a.y+"px",l.style.width=document.body.clientWidth-80+"px",l.style.height=document.body.clientHeight-80+"px",l.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(k,this.graph)}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(c){throw a.innerHTML=c.message,c;}})};
+"auto";GraphViewer.resizeSensorEnabled=!0;g.apply(this,arguments)};var k=d.editor.graph,l=k.container;l.style.overflow="hidden";this.lightboxChrome?(l.style.border="1px solid #c0c0c0",l.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(b.style.display="none",c.style.display="none");var m=this;k.getImageFromBundles=function(a){return m.getImageUrl(a)};var n=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=n.apply(this,arguments);a.getImageFromBundles=function(a){return m.getImageUrl(a)};
+return a};this.graphConfig.move&&(k.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(l.style,"border-radius","4px"),l.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(l.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(l.style,"transition","all .25s ease-in-out"));this.addClickHandler(k,d);window.setTimeout(mxUtils.bind(this,function(){l.style.outline="none";l.style.zIndex=
+this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(l);document.body.appendChild(c);d.setFileData(this.xml);mxUtils.setPrefixedStyle(l.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&&(l.style.position="absolute",l.style.display="block",l.style.left=a.x+"px",l.style.top=
+a.y+"px",l.style.width=document.body.clientWidth-80+"px",l.style.height=document.body.clientHeight-80+"px",l.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(k,this.graph)}),0);return d};
+GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(c){throw a.innerHTML=c.message,c;}})};
GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var c=0;c<b.length;c++)a.push(b[c]);return a}for(var d=document.getElementsByTagName("*"),b=[],c=0;c<d.length;c++){var e=d[c].className;null!=e&&0<e.length&&(e=e.split(" "),0<=mxUtils.indexOf(e,a)&&b.push(d[c]))}return b};
GraphViewer.createViewerForElement=function(a,b){var c=a.getAttribute("data-mxgraph");if(null!=c){var d=JSON.parse(c),e=function(c){c=mxUtils.parseXml(c);c=new GraphViewer(a,c.documentElement,d);null!=b&&b(c)};null!=d.url?GraphViewer.getUrl(d.url,function(a){e(a)}):e(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;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
+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,c){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=c;d.send()}};GraphViewer.resizeSensorEnabled=!0;
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(c,d){function e(){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 f(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function g(b,c){if(!b.resizedAttached)b.resizedAttached=
new e,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"==f(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],g=d.childNodes[0],k=b.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,H,E,G=function(){if((H=b.offsetWidth)!=p||(E=b.offsetHeight)!=q)m=!0,p=H,q=E;l()},C=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",G);C(k,"scroll",G)}var k=function(){GraphViewer.resizeSensorEnabled&&d()},l=Object.prototype.toString.call(c),m="[object Array]"===l||"[object NodeList]"===l||"[object HTMLCollection]"===l||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(m)for(var l=0,n=c.length;l<n;l++)g(c[l],k);else g(c,k);this.detach=function(){if(m)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};
+b.appendChild(b.resizeSensor);"static"==f(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],g=d.childNodes[0],k=b.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,E,H,G=function(){if((E=b.offsetWidth)!=p||(H=b.offsetHeight)!=q)m=!0,p=E,q=H;l()},D=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",G);D(k,"scroll",G)}var k=function(){GraphViewer.resizeSensorEnabled&&d()},l=Object.prototype.toString.call(c),m="[object Array]"===l||"[object NodeList]"===l||"[object HTMLCollection]"===l||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(m)for(var l=0,n=c.length;l<n;l++)g(c[l],k);else g(c,k);this.detach=function(){if(m)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();(function(){Editor.initMath();GraphViewer.initCss();mxStencilRegistry.dynamicLoading=!1;if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})(); \ No newline at end of file