6.0.3.5 release

Former-commit-id: 8cc51b3c2f
This commit is contained in:
Gaudenz Alder 2017-02-07 17:34:30 +01:00
parent bc61f33eaf
commit 38843f52e6
13 changed files with 1487 additions and 1509 deletions

View file

@ -1,3 +1,10 @@
07-FEB-2017: 6.0.3.5
- Fixes hidden image in Chrome for image export to new window
- Fixes fallback for non-public Google Drive files
- Fixes blurred image for client-side image export in Chrome
- Uses mxGraph 3.7.0.2 beta 2
07-FEB-2017: 6.0.3.4
- Shows related articles in help links

View file

@ -1 +1 @@
6.0.3.4
6.0.3.5

View file

@ -289,7 +289,7 @@ mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEna
m);null!=n&&s.setAttribute("clip",n?"1":"0");null!=p&&s.setAttribute("rotation",p);null!=q&&s.setAttribute("dir",q);this.root.appendChild(s)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(b){mxSvgCanvas2D.prototype.useDomParser=!1}})();mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.cacheOffsetSize=!0;mxSvgCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,b=a.lastIndexOf("#");0<b&&(a=a.substring(0,b));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};
mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);var c=this.root.ownerDocument.createElement(a);null!=b&&c.setAttribute("xmlns",b);return c};
@ -313,9 +313,9 @@ mxSvgCanvas2D.prototype.setLink=function(a){if(null==a)this.root=this.originalRo
mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b!=c){var g=b?d:0,k=b?-1:1,l=c?e:0,m=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(l)+")scale("+this.format(k)+","+this.format(m)+")translate("+this.format(-g)+","+this.format(-l)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",Math.round((a+c/2+e.dx)*e.scale));f.setAttribute("cy",Math.round((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;k=null!=k?k:!1;var l=this.state;a+=l.dx;b+=l.dy;var m=this.createElement("image");m.setAttribute("x",this.format(a*l.scale));m.setAttribute("y",this.format(b*l.scale));m.setAttribute("width",this.format(c*l.scale));m.setAttribute("height",this.format(d*l.scale));null==m.setAttributeNS?m.setAttribute("xlink:href",e):m.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",e);f||m.setAttribute("preserveAspectRatio",
"none");(1>l.alpha||1>l.fillAlpha)&&m.setAttribute("opacity",l.alpha*l.fillAlpha);e=this.state.transform||"";if(g||k){var n=f=1,p=0,q=0;g&&(f=-1,p=-c-2*a);k&&(n=-1,q=-d-2*b);e+="scale("+f+","+n+")translate("+p*l.scale+","+q*l.scale+")"}0<e.length&&m.setAttribute("transform",e);this.pointerEvents||m.setAttribute("pointer-events","none");this.root.appendChild(m);this.blockImagePointerEvents&&(m.setAttribute("style","pointer-events:none"),m=this.createElement("rect"),m.setAttribute("visibility","hidden"),
m.setAttribute("pointer-events","fill"),m.setAttribute("x",this.format(a*l.scale)),m.setAttribute("y",this.format(b*l.scale)),m.setAttribute("width",this.format(c*l.scale)),m.setAttribute("height",this.format(d*l.scale)),this.root.appendChild(m))};
mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;k=null!=k?k:!1;var l=this.state;a+=l.dx;b+=l.dy;var m=this.createElement("image");m.setAttribute("x",this.format(a*l.scale)+this.imageOffset);m.setAttribute("y",this.format(b*l.scale)+this.imageOffset);m.setAttribute("width",this.format(c*l.scale));m.setAttribute("height",this.format(d*l.scale));null==m.setAttributeNS?m.setAttribute("xlink:href",e):m.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",e);f||m.setAttribute("preserveAspectRatio","none");(1>l.alpha||1>l.fillAlpha)&&m.setAttribute("opacity",l.alpha*l.fillAlpha);e=this.state.transform||"";if(g||k){var n=f=1,p=0,q=0;g&&(f=-1,p=-c-2*a);k&&(n=-1,q=-d-2*b);e+="scale("+f+","+n+")translate("+p*l.scale+","+q*l.scale+")"}0<e.length&&m.setAttribute("transform",e);this.pointerEvents||m.setAttribute("pointer-events","none");this.root.appendChild(m);this.blockImagePointerEvents&&(m.setAttribute("style","pointer-events:none"),m=this.createElement("rect"),
m.setAttribute("visibility","hidden"),m.setAttribute("pointer-events","fill"),m.setAttribute("x",this.format(a*l.scale)),m.setAttribute("y",this.format(b*l.scale)),m.setAttribute("width",this.format(c*l.scale)),m.setAttribute("height",this.format(d*l.scale)),this.root.appendChild(m))};
mxSvgCanvas2D.prototype.convertHtml=function(a){if(this.useDomParser){var b=(new DOMParser).parseFromString(a,"text/html");null!=b&&(a=(new XMLSerializer).serializeToString(b.body),"\x3cbody"==a.substring(0,5)&&(a=a.substring(a.indexOf("\x3e",5)+1)),"\x3c/body\x3e"==a.substring(a.length-7,a.length)&&(a=a.substring(0,a.length-7)))}else{if(null!=document.implementation&&null!=document.implementation.createDocument){var b=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),
c=b.createElement("body");b.documentElement.appendChild(c);var d=document.createElement("div");d.innerHTML=a;for(a=d.firstChild;null!=a;)d=a.nextSibling,c.appendChild(b.adoptNode(a)),a=d;return c.innerHTML}b=document.createElement("textarea");b.innerHTML=a.replace(/&amp;/g,"\x26amp;amp;").replace(/&#60;/g,"\x26amp;lt;").replace(/&#62;/g,"\x26amp;gt;").replace(/&lt;/g,"\x26amp;lt;").replace(/&gt;/g,"\x26amp;gt;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;");a=b.value.replace(/&/g,"\x26amp;").replace(/&amp;lt;/g,
"\x26lt;").replace(/&amp;gt;/g,"\x26gt;").replace(/&amp;amp;/g,"\x26amp;").replace(/<br>/g,"\x3cbr /\x3e").replace(/<hr>/g,"\x3chr /\x3e").replace(/(<img[^>]+)>/gm,"$1 /\x3e")}return a};

View file

@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 02/07/2017 02:19 PM
# 02/07/2017 05:29 PM
/app.html
/index.html?offline=1

167
war/js/app.min.js vendored
View file

@ -82,7 +82,7 @@ time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"
u.URIEFFECTS=u.J;u.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};u.ltypes=u.M;u.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};u.LOADERTYPES=u.I;"undefined"!==typeof window&&(window.html4=u);b=function(b){function e(b,a){var d;if(O.hasOwnProperty(a))d=O[a];else{var c=a.match(M);d=c?String.fromCharCode(parseInt(c[1],10)):(c=a.match($))?String.fromCharCode(parseInt(c[1],
16)):J&&N.test(a)?(J.innerHTML="\x26"+a+";",c=J.textContent,O[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(X,e)}function k(b){return(""+b).replace(da,"\x26amp;").replace(Z,"\x26lt;").replace(aa,"\x26gt;").replace(Y,"\x26#34;")}function l(b){return b.replace(U,"\x26amp;$1").replace(Z,"\x26lt;").replace(aa,"\x26gt;")}function m(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,
e){var c,g=/(<\/|<\!--|<[!?]|[&<>])/g;c=b+"";if(ha)c=c.split(g);else{for(var k=[],l=0,n;(n=g.exec(c))!==f;)k.push(c.substring(l,n.index)),k.push(n[0]),l=n.index+n[0].length;k.push(c.substring(l));c=k}u(a,c,0,{r:d,C:d},e)}}function p(b,a,d,e,c){return function(){u(b,a,d,e,c)}}function u(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,n,m=d.length;e<m;){var t=d[e++],s=d[e];switch(t){case "\x26":fa.test(s)?(a.e&&a.e("\x26"+s,g,ba,p(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,ba,p(a,d,e,f,g));break;case "\x3c/":if(k=
/^([-\w:]+)[^\'\"]*/.exec(s))if(k[0].length===s.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,ba,p(a,d,e,f,g));else{var A=d,z=e,y=a,F=g,D=ba,E=f,I=q(A,z);I?(y.t&&y.t(I.name,F,D,p(y,A,z,E,F)),e=I.next):e=A.length}else a.e&&a.e("\x26lt;/",g,ba,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(s))if(k[0].length===s.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,ba,p(a,d,e,f,g));var O=b.f[n];O&ca&&(e=v(d,{name:n,next:e,c:O},a,g,ba,f))}else{var A=d,z=a,y=
/^([-\w:]+)[^\'\"]*/.exec(s))if(k[0].length===s.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,ba,p(a,d,e,f,g));else{var A=d,z=e,y=a,F=g,D=ba,E=f,O=q(A,z);O?(y.t&&y.t(O.name,F,D,p(y,A,z,E,F)),e=O.next):e=A.length}else a.e&&a.e("\x26lt;/",g,ba,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(s))if(k[0].length===s.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,ba,p(a,d,e,f,g));var I=b.f[n];I&ca&&(e=v(d,{name:n,next:e,c:I},a,g,ba,f))}else{var A=d,z=a,y=
g,F=ba,D=f,B=q(A,e);B?(z.w&&z.w(B.name,B.R,y,F,p(z,A,B.next,D,y)),e=B.c&ca?v(A,B,z,y,F,D):B.next):e=A.length}else a.e&&a.e("\x26lt;",g,ba,p(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<m&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<m){if(a.A){var S=d.slice(e,l).join("");a.A(S.substr(0,S.length-2),g,ba,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,ba,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(s)){if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
g,ba,p(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,ba,p(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,ba,p(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,ba,p(a,d,e,f,g));break;case "":break;default:a.e&&a.e(t,g,ba,p(a,d,e,f,g))}}a.B&&a.B(g)}catch(T){if(T!==ba)throw T;}}function v(a,d,e,c,f,g){var k=a.length;ga.hasOwnProperty(d.name)||(ga[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=ga[d.name],m=d.next,u=d.next+1;u<
k&&!("\x3c/"===a[u-1]&&n.test(a[u]));u++);u<k&&(u-=1);k=a.slice(m,u).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,p(e,a,u,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,p(e,a,u,g,c));else throw Error("bug");return u}function q(a,e){var f=/^([-\w:]+)/.exec(a[e]),k={};k.name=f[1].toLowerCase();k.c=b.f[k.name];for(var l=a[e].substr(f[0].length),n=e+1,m=a.length;n<m&&"\x3e"!==a[n];n++)l+=a[n];if(!(m<=n)){for(var p=[];""!==l;)if(f=S.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],u=d,l=[l,a[n++]];n<
@ -484,7 +484,7 @@ mxXmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p,s){if(this.textEna
n);null!=m&&t.setAttribute("clip",m?"1":"0");null!=p&&t.setAttribute("rotation",p);null!=s&&t.setAttribute("dir",s);this.root.appendChild(t)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
function mxSvgCanvas2D(a,c){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=c?c:!1;var f=null;if(a.ownerDocument!=document)for(f=a;null!=f&&"svg"!=f.nodeName;)f=f.parentNode;null!=f&&(0<f.getElementsByTagName("defs").length&&(this.defs=f.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=f.firstChild?f.insertBefore(this.defs,f.firstChild):f.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(c){mxSvgCanvas2D.prototype.useDomParser=!1}})();mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.cacheOffsetSize=!0;mxSvgCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,c=a.lastIndexOf("#");0<c&&(a=a.substring(0,c));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};
mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
mxSvgCanvas2D.prototype.createElement=function(a,c){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(c||mxConstants.NS_SVG,a);var f=this.root.ownerDocument.createElement(a);null!=c&&f.setAttribute("xmlns",c);return f};
@ -508,9 +508,9 @@ mxSvgCanvas2D.prototype.setLink=function(a){if(null==a)this.root=this.originalRo
mxSvgCanvas2D.prototype.rotate=function(a,c,f,d,b){if(0!=a||c||f){var e=this.state;d+=e.dx;b+=e.dy;d*=e.scale;b*=e.scale;e.transform=e.transform||"";if(c&&f)a+=180;else if(c!=f){var g=c?d:0,k=c?-1:1,l=f?b:0,n=f?-1:1;e.transform+="translate("+this.format(g)+","+this.format(l)+")scale("+this.format(k)+","+this.format(n)+")translate("+this.format(-g)+","+this.format(-l)+")"}if(c?!f:f)a*=-1;0!=a&&(e.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(b)+")");e.rotation+=a;e.rotationCx=
d;e.rotationCy=b}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,c,f,d){var b=this.state,e=this.createElement("rect");e.setAttribute("x",this.format((a+b.dx)*b.scale));e.setAttribute("y",this.format((c+b.dy)*b.scale));e.setAttribute("width",this.format(f*b.scale));e.setAttribute("height",this.format(d*b.scale));this.node=e};
mxSvgCanvas2D.prototype.roundrect=function(a,c,f,d,b,e){this.rect(a,c,f,d);0<b&&this.node.setAttribute("rx",this.format(b*this.state.scale));0<e&&this.node.setAttribute("ry",this.format(e*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,c,f,d){var b=this.state,e=this.createElement("ellipse");e.setAttribute("cx",Math.round((a+f/2+b.dx)*b.scale));e.setAttribute("cy",Math.round((c+d/2+b.dy)*b.scale));e.setAttribute("rx",f/2*b.scale);e.setAttribute("ry",d/2*b.scale);this.node=e};
mxSvgCanvas2D.prototype.image=function(a,c,f,d,b,e,g,k){b=this.converter.convert(b);e=null!=e?e:!0;g=null!=g?g:!1;k=null!=k?k:!1;var l=this.state;a+=l.dx;c+=l.dy;var n=this.createElement("image");n.setAttribute("x",this.format(a*l.scale));n.setAttribute("y",this.format(c*l.scale));n.setAttribute("width",this.format(f*l.scale));n.setAttribute("height",this.format(d*l.scale));null==n.setAttributeNS?n.setAttribute("xlink:href",b):n.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",b);e||n.setAttribute("preserveAspectRatio",
"none");(1>l.alpha||1>l.fillAlpha)&&n.setAttribute("opacity",l.alpha*l.fillAlpha);b=this.state.transform||"";if(g||k){var m=e=1,p=0,s=0;g&&(e=-1,p=-f-2*a);k&&(m=-1,s=-d-2*c);b+="scale("+e+","+m+")translate("+p*l.scale+","+s*l.scale+")"}0<b.length&&n.setAttribute("transform",b);this.pointerEvents||n.setAttribute("pointer-events","none");this.root.appendChild(n);this.blockImagePointerEvents&&(n.setAttribute("style","pointer-events:none"),n=this.createElement("rect"),n.setAttribute("visibility","hidden"),
n.setAttribute("pointer-events","fill"),n.setAttribute("x",this.format(a*l.scale)),n.setAttribute("y",this.format(c*l.scale)),n.setAttribute("width",this.format(f*l.scale)),n.setAttribute("height",this.format(d*l.scale)),this.root.appendChild(n))};
mxSvgCanvas2D.prototype.image=function(a,c,f,d,b,e,g,k){b=this.converter.convert(b);e=null!=e?e:!0;g=null!=g?g:!1;k=null!=k?k:!1;var l=this.state;a+=l.dx;c+=l.dy;var n=this.createElement("image");n.setAttribute("x",this.format(a*l.scale)+this.imageOffset);n.setAttribute("y",this.format(c*l.scale)+this.imageOffset);n.setAttribute("width",this.format(f*l.scale));n.setAttribute("height",this.format(d*l.scale));null==n.setAttributeNS?n.setAttribute("xlink:href",b):n.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",b);e||n.setAttribute("preserveAspectRatio","none");(1>l.alpha||1>l.fillAlpha)&&n.setAttribute("opacity",l.alpha*l.fillAlpha);b=this.state.transform||"";if(g||k){var m=e=1,p=0,s=0;g&&(e=-1,p=-f-2*a);k&&(m=-1,s=-d-2*c);b+="scale("+e+","+m+")translate("+p*l.scale+","+s*l.scale+")"}0<b.length&&n.setAttribute("transform",b);this.pointerEvents||n.setAttribute("pointer-events","none");this.root.appendChild(n);this.blockImagePointerEvents&&(n.setAttribute("style","pointer-events:none"),n=this.createElement("rect"),
n.setAttribute("visibility","hidden"),n.setAttribute("pointer-events","fill"),n.setAttribute("x",this.format(a*l.scale)),n.setAttribute("y",this.format(c*l.scale)),n.setAttribute("width",this.format(f*l.scale)),n.setAttribute("height",this.format(d*l.scale)),this.root.appendChild(n))};
mxSvgCanvas2D.prototype.convertHtml=function(a){if(this.useDomParser){var c=(new DOMParser).parseFromString(a,"text/html");null!=c&&(a=(new XMLSerializer).serializeToString(c.body),"\x3cbody"==a.substring(0,5)&&(a=a.substring(a.indexOf("\x3e",5)+1)),"\x3c/body\x3e"==a.substring(a.length-7,a.length)&&(a=a.substring(0,a.length-7)))}else{if(null!=document.implementation&&null!=document.implementation.createDocument){var c=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),
f=c.createElement("body");c.documentElement.appendChild(f);var d=document.createElement("div");d.innerHTML=a;for(a=d.firstChild;null!=a;)d=a.nextSibling,f.appendChild(c.adoptNode(a)),a=d;return f.innerHTML}c=document.createElement("textarea");c.innerHTML=a.replace(/&amp;/g,"\x26amp;amp;").replace(/&#60;/g,"\x26amp;lt;").replace(/&#62;/g,"\x26amp;gt;").replace(/&lt;/g,"\x26amp;lt;").replace(/&gt;/g,"\x26amp;gt;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;");a=c.value.replace(/&/g,"\x26amp;").replace(/&amp;lt;/g,
"\x26lt;").replace(/&amp;gt;/g,"\x26gt;").replace(/&amp;amp;/g,"\x26amp;").replace(/<br>/g,"\x3cbr /\x3e").replace(/<hr>/g,"\x3chr /\x3e").replace(/(<img[^>]+)>/gm,"$1 /\x3e")}return a};
@ -2499,42 +2499,42 @@ g.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;d.push(g)}}if
Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.encodeCells=function(b){for(var a=this.cloneCells(b),d=0;d<a.length;d++){var c=this.view.getState(b[d]);if(null!=c){var e=this.getCellGeometry(a[d]);null!=e&&e.relative&&(e.relative=!1,e.x=c.x/c.view.scale-c.view.translate.x,e.y=c.y/c.view.scale-c.view.translate.y)}}for(var c=new mxCodec,e=new mxGraphModel,f=e.getChildAt(e.getRoot(),0),d=0;d<b.length;d++)e.add(f,a[d]);
return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,a){return this.getLinkForCell(b.cell)});return b};Graph.prototype.getSvg=function(b,a,d,c,e,f,g){a=null!=a?a:1;d=null!=d?d:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var k=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,n=mxUtils.createXmlDocument();c=
null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=b&&(null!=c.style?c.style.backgroundColor=b:c.setAttribute("style","background-color:"+b));null==n.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=a/l;c.setAttribute("width",Math.ceil(k.width*b)+2*d+"px");c.setAttribute("height",Math.ceil(k.height*b)+2*
d+"px");c.setAttribute("version","1.1");var m=c;e&&(m=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),c.appendChild(m));n.appendChild(c);n=this.createSvgCanvas(m);n.foOffset=e?-0.5:0;n.textOffset=e?-0.5:0;n.translate(Math.floor((d/a-k.x)/l),Math.floor((d/a-k.y)/l));var p=n.createAlternateContent;n.createAlternateContent=function(b,a,d,c,e,f,g,k,l,n,m,u,v){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&
f.length<5*c/q.fontSize)){var x=this.createElement("text");x.setAttribute("x",Math.round(c/2));x.setAttribute("y",Math.round((e+q.fontSize)/2));x.setAttribute("fill",q.fontColor||"black");x.setAttribute("text-anchor","middle");x.setAttribute("font-size",Math.round(q.fontSize)+"px");x.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&x.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&x.setAttribute("font-style",
"italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&x.setAttribute("text-decoration","underline");mxUtils.write(x,f);return x}return p.apply(this,arguments)};d=this.backgroundImage;null!=d&&(e=l/a,a=this.view.translate,e=new mxRectangle(a.x*e,a.y*e,d.width*e,d.height*e),mxUtils.intersects(k,e)&&n.image(a.x,a.y,d.width,d.height,d.src,!0));n.scale(b);n.textEnabled=g;g=this.createSvgImageExport();var u=g.drawCellState;g.drawCellState=function(b,a){(f||b.view.graph.isCellSelected(b.cell))&&
u.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),n);return c};Graph.prototype.createSvgCanvas=function(b){return new mxSvgCanvas2D(b)};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var a=window.getSelection();a.getRangeAt&&a.rangeCount&&(b=a.getRangeAt(0).commonAncestorContainer)}else document.selection&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getParentByName=function(b,a,d){for(;null!=b&&b.nodeName!=
a;){if(b==d)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var a=null;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){var d=document.createRange();d.selectNode(b);a.removeAllRanges();a.addRange(d)}}else if((a=document.selection)&&"Control"!=a.type)b=a.createRange(),b.collapse(!0),d=a.createRange(),d.setEndPoint("StartToStart",b),d.select()};Graph.prototype.insertRow=function(b,a){for(var d=b.tBodies[0],c=0<d.rows.length?d.rows[0].cells.length:
1,d=d.insertRow(a),e=0;e<c;e++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(b,a){b.tBodies[0].deleteRow(a)};Graph.prototype.insertColumn=function(b,a){var d=b.tHead;if(null!=d)for(var c=0;c<d.rows.length;c++){var e=document.createElement("th");d.rows[c].appendChild(e);mxUtils.br(e)}d=b.tBodies[0];for(c=0;c<d.rows.length;c++)e=d.rows[c].insertCell(a),mxUtils.br(e);return d.rows[0].cells[0<=a?a:d.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,
a){if(0<=a)for(var d=b.tBodies[0].rows,c=0;c<d.length;c++)d[c].cells.length>a&&d[c].deleteCell(a)};Graph.prototype.pasteHtmlAtCaret=function(b){var a;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){a=a.getRangeAt(0);a.deleteContents();var d=document.createElement("div");d.innerHTML=b;b=document.createDocumentFragment();for(var c;c=d.firstChild;)lastNode=b.appendChild(c);a.insertNode(b)}}else(a=document.selection)&&"Control"!=a.type&&a.createRange().pasteHTML(b)};Graph.prototype.initTouch=
function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(b,a){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(a){a=b.apply(this,arguments);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(c){}};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{b=b.firstChild;for(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;c(a);a=d}(1!=b.nodeType||"BR"!==b.nodeName&&null==b.firstChild)&&(3!=b.nodeType||0==mxUtils.trim(mxUtils.getTextContent(b)).length)?b.parentNode.removeChild(b):(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,
"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border")))}k.apply(this,arguments);!mxClient.IS_QUIRKS&&7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=a(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){d(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=
function(){var b=this.graph.view.getState(this.editingCell),a=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),d=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(a?k.replace(/\n/g,"\x3cbr/\x3e"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,b=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=
mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=b?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=a;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);!mxClient.IS_QUIRKS&&8!=document.documentMode&&(k=mxUtils.replaceTrailingNewlines(k,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));k=this.graph.sanitizeHtml(a?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"\x3cbr\x3e"):k,!0);this.textarea.className=
"mxCellEditor mxPlainTextEditor";c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=
k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=d;this.resize()};var l=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,a){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=b){var d=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
160*d;this.bounds.height=60*d;var c=null!=b.text?b.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,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,"\x3cbr/\x3e"));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,"\x3cbr/\x3e").replace(/\n/g,
"\x3cbr/\x3e"):a.replace(/\r\n/g,"").replace(/\n/g,"")};var n=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();n.apply(this,arguments);try{this.graph.container.focus()}catch(a){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,a){this.graph.getModel().beginUpdate();try{if(m.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=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(b,a){return!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!mxEvent.isControlDown(a.getEvent())&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(b,a){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&
null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(a.getEvent())||mxEvent.isMetaDown(a.getEvent())};var s=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),a=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(a/=2,b.x=this.sizers[0].bounds.width+a,b.y=this.sizers[0].bounds.height+a):b=s.apply(this,arguments);return b};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+"\x26deg;":(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,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var c=this.graph.view.translate,e=this.graph.view.scale,f=this.roundLength(d.x/e-c.x),c=this.roundLength(d.y/e-c.y);this.hint.innerHTML=f+", "+c;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(),d.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\x3d\x3d":
d+"px");c.setAttribute("version","1.1");var m=c;e&&(m=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),c.appendChild(m));n.appendChild(c);n=this.createSvgCanvas(m);n.foOffset=e?-0.5:0;n.textOffset=e?-0.5:0;n.imageOffset=e?-0.5:0;n.translate(Math.floor((d/a-k.x)/l),Math.floor((d/a-k.y)/l));var p=n.createAlternateContent;n.createAlternateContent=function(b,a,d,c,e,f,g,k,l,n,m,u,v){var q=this.state;if(null!=this.foAltText&&
(0==c||0!=q.fontSize&&f.length<5*c/q.fontSize)){var x=this.createElement("text");x.setAttribute("x",Math.round(c/2));x.setAttribute("y",Math.round((e+q.fontSize)/2));x.setAttribute("fill",q.fontColor||"black");x.setAttribute("text-anchor","middle");x.setAttribute("font-size",Math.round(q.fontSize)+"px");x.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&x.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
x.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&x.setAttribute("text-decoration","underline");mxUtils.write(x,f);return x}return p.apply(this,arguments)};d=this.backgroundImage;null!=d&&(e=l/a,a=this.view.translate,e=new mxRectangle(a.x*e,a.y*e,d.width*e,d.height*e),mxUtils.intersects(k,e)&&n.image(a.x,a.y,d.width,d.height,d.src,!0));n.scale(b);n.textEnabled=g;g=this.createSvgImageExport();var u=g.drawCellState;g.drawCellState=function(b,
a){(f||b.view.graph.isCellSelected(b.cell))&&u.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),n);return c};Graph.prototype.createSvgCanvas=function(b){return new mxSvgCanvas2D(b)};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var a=window.getSelection();a.getRangeAt&&a.rangeCount&&(b=a.getRangeAt(0).commonAncestorContainer)}else document.selection&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getParentByName=
function(b,a,d){for(;null!=b&&b.nodeName!=a;){if(b==d)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var a=null;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){var d=document.createRange();d.selectNode(b);a.removeAllRanges();a.addRange(d)}}else if((a=document.selection)&&"Control"!=a.type)b=a.createRange(),b.collapse(!0),d=a.createRange(),d.setEndPoint("StartToStart",b),d.select()};Graph.prototype.insertRow=function(b,a){for(var d=b.tBodies[0],
c=0<d.rows.length?d.rows[0].cells.length:1,d=d.insertRow(a),e=0;e<c;e++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(b,a){b.tBodies[0].deleteRow(a)};Graph.prototype.insertColumn=function(b,a){var d=b.tHead;if(null!=d)for(var c=0;c<d.rows.length;c++){var e=document.createElement("th");d.rows[c].appendChild(e);mxUtils.br(e)}d=b.tBodies[0];for(c=0;c<d.rows.length;c++)e=d.rows[c].insertCell(a),mxUtils.br(e);return d.rows[0].cells[0<=a?a:d.rows[0].cells.length-1]};
Graph.prototype.deleteColumn=function(b,a){if(0<=a)for(var d=b.tBodies[0].rows,c=0;c<d.length;c++)d[c].cells.length>a&&d[c].deleteCell(a)};Graph.prototype.pasteHtmlAtCaret=function(b){var a;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){a=a.getRangeAt(0);a.deleteContents();var d=document.createElement("div");d.innerHTML=b;b=document.createDocumentFragment();for(var c;c=d.firstChild;)lastNode=b.appendChild(c);a.insertNode(b)}}else(a=document.selection)&&"Control"!=a.type&&
a.createRange().pasteHTML(b)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(b,a){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(a){a=b.apply(this,arguments);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(c){}};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{b=b.firstChild;for(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;c(a);a=d}(1!=b.nodeType||"BR"!==b.nodeName&&null==b.firstChild)&&(3!=b.nodeType||0==mxUtils.trim(mxUtils.getTextContent(b)).length)?b.parentNode.removeChild(b):(3==
b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border")))}k.apply(this,arguments);!mxClient.IS_QUIRKS&&7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=a(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
function(){d(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell),a=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),d=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(a?k.replace(/\n/g,"\x3cbr/\x3e"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(b.style,
mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,b=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==
mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=b?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=a;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=
k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);!mxClient.IS_QUIRKS&&8!=document.documentMode&&(k=mxUtils.replaceTrailingNewlines(k,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));k=this.graph.sanitizeHtml(a?k.replace(/\n/g,
"").replace(/&lt;br\s*.?&gt;/g,"\x3cbr\x3e"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign=
"left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=d;this.resize()};var l=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,a){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=b){var d=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);
if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*d;this.bounds.height=60*d;var c=null!=b.text?b.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,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,"\x3cbr/\x3e"));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,"\x3cbr/\x3e").replace(/\n/g,"\x3cbr/\x3e"):a.replace(/\r\n/g,"").replace(/\n/g,"")};var n=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();n.apply(this,arguments);try{this.graph.container.focus()}catch(a){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,a){this.graph.getModel().beginUpdate();try{if(m.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=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(b,a){return!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!mxEvent.isControlDown(a.getEvent())&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(b,a){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&
"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(a.getEvent())||mxEvent.isMetaDown(a.getEvent())};var s=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),a=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(a/=2,b.x=this.sizers[0].bounds.width+a,b.y=this.sizers[0].bounds.height+
a):b=s.apply(this,arguments);return b};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+"\x26deg;":(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,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var c=this.graph.view.translate,e=this.graph.view.scale,f=this.roundLength(d.x/e-c.x),c=this.roundLength(d.y/
e-c.y);this.hint.innerHTML=f+", "+c;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(),
d.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\x3d\x3d":
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\x3d":
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\x3d\x3d":
@ -7534,7 +7534,7 @@ 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,n){if(null!=c&&null==mxMarker.markers[c]){var m=this.getPackageForType(c);null!=m&&mxStencilRegistry.getStencil(m)}return t.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.0.3.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";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,n){if(null!=c&&null==mxMarker.markers[c]){var m=this.getPackageForType(c);null!=m&&mxStencilRegistry.getStencil(m)}return t.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.0.3.5";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle=
"shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=
1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(function(){EditorUi.prototype.useCanvasForExport=!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(d){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();
EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};
@ -7605,38 +7605,36 @@ typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=docum
!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(g){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml\x3d"+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"\x26mime\x3d"+c:"")+(null!=e?"\x26format\x3d"+e:"")+(null!=f?"\x26base64\x3d"+f:"")+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):"")+(d?
"\x26binary\x3d1":""))};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 q=1024*g,v=Math.min(q+1024,d),u=Array(v-q),x=0;q<v;++x,++q)u[x]=c[q].charCodeAt(0);f[g]=new Uint8Array(u)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){var f=!mxClient.IS_IOS||!navigator.standalone;e=!this.isOfflineApp()&&!this.isOffline()&&("function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||
"function"===typeof window.OneDriveClient);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):null!=c&&"image/"==c.substring(0,6)&&("image/svg"!=c.substring(0,9)||mxClient.IS_SVG)?mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode?(f.document.write('\x3chtml\x3e\x3cimg src\x3d"data:'+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))+'"/\x3e\x3c/html\x3e'),f.document.close()):f.location.replace("data:"+
c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}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(g){this.handleError(g)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,f);this.showDialog(b.container,380,e?280:160,!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,e=!this.isOfflineApp()&&!this.isOffline()&&("function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||"function"===typeof window.OneDriveClient);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())this.handleError({message:mxResources.get("errorSavingFile")});else try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),
a,f,!0,d,c)}catch(g){this.handleError(g)}}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d);this.showDialog(a.container,380,e?280:160,!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){if(this.spinner.spin(document.body,mxResources.get("export"))){var q=
this.editor.graph.isSelectionEmpty();c=null!=c?c:q;q=b?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&!1==b&&(q="#ffffff");var v=this.editor.graph.getSvg(q,a,null,g,null,c);d&&this.editor.addSvgShadow(v);a=this.getCurrentFile();var u=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=u.lastIndexOf(".");0<a&&(u=u.substring(0,a));var u=u+".svg",x=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));
var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(u,"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,v,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(v,
x,this.thumbImageCache)):x(v)}))}};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.showRemoteExportDialog=function(a,b,c){var d=document.createElement("div");d.style.padding="6px";var e=document.createElement("h3");
mxUtils.write(e,mxResources.get("export")+" "+mxResources.get("image"));e.style.marginTop="0px";e.style.marginBottom="8px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,140,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e){var f=
this.editor.graph,g=document.createElement("div");g.style.paddingTop="10px";g.style.paddingRight="8px";var q=240,v=this.addCheckbox(g,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background),u=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.setAttribute("type","checkbox");e&&(g.appendChild(x),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),
q+=26);f.isSelectionEmpty()&&x.setAttribute("disabled","disabled");var A=this.addCheckbox(g,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&y.setAttribute("disabled","disabled");a&&(g.appendChild(y),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),q+=26);var z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight=
"8px";z.setAttribute("type","checkbox");z.style.marginBottom="8px";z.setAttribute("checked","checked");z.defaultChecked=!0;g.appendChild(z);mxUtils.write(g,mxResources.get("includeCopyOfMyDiagram"));a=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,v.checked,!u.checked,A.checked,z.checked,y.checked,x.checked)}),mxResources.get("zoom")+" (%)",null,g,!this.isOffline()?c:null);this.showDialog(a.container,320,q,!0,!0);a.init()};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,q){var v=
this.getCurrentFile(),u=[];d&&(u.push("chrome\x3d0"),u.push("lightbox\x3d1"),"auto"!=a&&u.push("target\x3d"+a),null!=b&&u.push("highlight\x3d"+("#"==b.charAt(0)?b.substring(1):b)),e&&u.push("edit\x3d_blank"),f&&u.push("layers\x3d1"));null!=v&&null!=v.getTitle()&&u.push("title\x3d"+encodeURIComponent(v.getTitle()));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&u.push("page\x3d"+a);break}a="";null!=g?a="#U"+encodeURIComponent(g):
(v=this.getCurrentFile(),a=!q&&null!=v&&v.constructor==DriveFile?"#"+v.getHash():"#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<u.length?"?"+u.join("\x26"):"")+a};EditorUi.prototype.showEmbedHtmlDialog=function(a,b){function c(){null==A||A==mxConstants.NONE?(x.style.backgroundColor="",x.style.backgroundImage="url('"+
Dialog.prototype.noColorImage+"')"):(x.style.backgroundColor=A,x.style.backgroundImage="")}var d=document.createElement("div");d.style.padding="6px";d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);e=document.createElement("div");e.style.cssText="border-bottom:1px solid lightGray;padding-bottom:6px;margin-bottom:8px;";var f=document.createElement("input");
f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");var g=f.cloneNode(!0);g.setAttribute("value","copy");e.appendChild(g);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));e.appendChild(q);mxUtils.br(e);e.appendChild(f);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));e.appendChild(q);var v=this.getCurrentFile();
null==a&&(null!=v&&v.constructor==DriveFile)&&(q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(v.getId())})),q.style.marginTop="12px",q.style.marginLeft="8px",q.className="geBtn",e.appendChild(q));g.setAttribute("checked","checked");null==a&&f.setAttribute("disabled","disabled");d.appendChild(e);mxUtils.write(d,mxResources.get("link")+":");var u=document.createElement("select");u.style.width="100px";u.style.marginLeft="6px";u.style.marginRight=
"10px";u.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));u.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));u.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));u.appendChild(e);d.appendChild(u);mxUtils.write(d,mxResources.get("borderColor")+":");var x=
document.createElement("button");x.style.width="18px";x.style.height="18px";x.style.marginLeft="6px";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";var A="#0000ff";c();mxEvent.addListener(x,"click",mxUtils.bind(this,function(a){this.pickColor(A||"none",function(a){A=a;c()});mxEvent.consume(a)}));d.appendChild(x);mxUtils.br(d);var y=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var z=document.createElement("input");z.setAttribute("type",
"text");z.style.marginRight="16px";z.style.width="40px";z.style.marginLeft="6px";z.style.marginRight="12px";z.value="100%";d.appendChild(z);var D=this.addCheckbox(d,mxResources.get("fit"),!0),e=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(d,mxResources.get("allPages"),e,!e),C=this.addCheckbox(d,mxResources.get("layers"),!0),F=this.addCheckbox(d,mxResources.get("lightbox"),!0),H=this.addCheckbox(d,mxResources.get("showEditButton"),!0);H.style.marginLeft="24px";H.style.marginBottom="8px";
mxEvent.addListener(F,"change",function(){F.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")});d=new CustomDialog(this,d,mxUtils.bind(this,function(){b(f.checked?a:null,y.checked,z.value,u.value,A,D.checked,B.checked,C.checked,F.checked,H.checked)}),null,mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542-how-to-embed-html-");this.showDialog(d.container,320,360,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,
e){function f(){null==D||D==mxConstants.NONE?(z.style.backgroundColor="",z.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(z.style.backgroundColor=D,z.style.backgroundImage="")}var g=document.createElement("div");g.style.padding="6px";var q=document.createElement("h3");mxUtils.write(q,a||mxResources.get("link"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(q);var v=this.getCurrentFile();a=0;if(null!=v&&v.constructor==DriveFile&&
!b){a=80;q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;padding-top:6px;margin-bottom:12px;text-align:center;";mxUtils.write(q,mxResources.get("linkAccountRequired"));mxUtils.br(q);var u=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(v.getId())}));u.style.marginTop="12px";u.className="geBtn";q.appendChild(u);g.appendChild(q);u=document.createElement("a");u.style.paddingLeft="12px";u.style.color=
"gray";u.style.fontSize="11px";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("check"));q.appendChild(u);mxEvent.addListener(u,"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,340,80,!0,!1);
a.init()}))}))}var x=null,A=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),x=document.createElement("input"),x.setAttribute("type","text"),x.style.marginRight="16px",x.style.width="50px",x.style.marginTop="16px",x.style.marginLeft="6px",x.style.marginRight="16px",x.value="100%",g.appendChild(x),mxUtils.write(g,mxResources.get("height")+":"),A=document.createElement("input"),A.setAttribute("type","text"),A.style.width="50px",A.style.marginTop="16px",A.style.marginLeft=
"6px",A.style.marginBottom="6px",A.value=d+"px",g.appendChild(A),mxUtils.br(g);mxUtils.write(g,mxResources.get("link")+":");var y=document.createElement("select");y.style.width="100px";y.style.marginLeft="6px";y.style.marginRight="10px";y.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));y.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));
y.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));y.appendChild(c);g.appendChild(y);mxUtils.write(g,mxResources.get("borderColor")+":");var z=document.createElement("button");z.style.width="18px";z.style.height="18px";z.style.marginLeft="6px";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";var D="#0000ff";f();mxEvent.addListener(z,"click",mxUtils.bind(this,function(a){this.pickColor(D||
"none",function(a){D=a;f()});mxEvent.consume(a)}));g.appendChild(z);mxUtils.br(g);c=null!=this.pages&&1<this.pages.length;var B=null;if(null==v||v.constructor!=DriveFile||b)B=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var C=this.addCheckbox(g,mxResources.get("lightbox"),!0),F=this.addCheckbox(g,mxResources.get("showEditButton"),!0);F.style.marginLeft="24px";var H=this.addCheckbox(g,mxResources.get("layers"),!0);H.style.marginLeft=F.style.marginLeft;H.style.marginBottom="4px";mxEvent.addListener(C,
"change",function(){C.checked?(H.removeAttribute("disabled"),F.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(y.value,D,null==B?!0:B.checked,C.checked,F.checked,H.checked,null!=x?x.value:null,null!=A?A.value:null)}),null,mxResources.get("create"));this.showDialog(b.container,280,250+a,!0,!0);null!=x?(x.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():
document.execCommand("selectAll",!1,null)):y.focus()};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.padding="6px";var g=this.editor.graph;if(null!=b){var q=document.createElement("h3");mxUtils.write(q,b);q.style.marginTop="0px";q.style.marginBottom="8px";f.appendChild(q)}var v=this.addCheckbox(f,mxResources.get("fit"),!0),u=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),x=this.addCheckbox(f,c),A=this.addCheckbox(f,mxResources.get("lightbox"),
!0),y=this.addCheckbox(f,mxResources.get("showEditButton"),!0);y.style.marginLeft="24px";var z=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(f,mxResources.get("layers"),z,!z);D.style.marginLeft=y.style.marginLeft;D.style.marginBottom="8px";mxEvent.addListener(A,"change",function(){A.checked?(z&&D.removeAttribute("disabled"),y.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(v.checked,
u.checked,x.checked,A.checked,y.checked,D.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,q){function v(b){var l=" ",v="";d&&(l=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
"function"===typeof window.OneDriveClient);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))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('\x3chtml\x3e\x3cimg src\x3d"data:'+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))+'"/\x3e\x3c/html\x3e'),f.document.close())}else f=
window.open("data:"+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());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(g){this.handleError(g)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),
mxResources.get("download"),!1,!1,f);this.showDialog(b.container,380,e?280:160,!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,e=!this.isOfflineApp()&&!this.isOffline()&&("function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||
"function"===typeof window.OneDriveClient);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())this.handleError({message:mxResources.get("errorSavingFile")});
else try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(g){this.handleError(g)}}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d);this.showDialog(a.container,380,e?280:160,!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){if(this.spinner.spin(document.body,mxResources.get("export"))){var q=this.editor.graph.isSelectionEmpty();c=null!=c?c:q;q=b?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&!1==b&&(q="#ffffff");var v=this.editor.graph.getSvg(q,a,null,g,null,c);d&&this.editor.addSvgShadow(v);a=this.getCurrentFile();var u=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=u.lastIndexOf(".");0<a&&(u=u.substring(0,a));var u=u+".svg",x=mxUtils.bind(this,function(a){this.spinner.stop();
e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(u,"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,v,!1,mxUtils.bind(this,function(){f?
(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(v,x,this.thumbImageCache)):x(v)}))}};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){function b(){null==
f||f==mxConstants.NONE?(e.style.backgroundColor="",e.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(e.style.backgroundColor=f,e.style.backgroundImage="")}mxUtils.write(a,mxResources.get("link")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="6px";c.style.marginRight="10px";c.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));c.appendChild(d);d=document.createElement("option");
d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));c.appendChild(d);a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var e=document.createElement("button");e.style.width="18px";e.style.height="18px";e.style.marginLeft="6px";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";var f="#0000ff";
b();mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(a)}));a.appendChild(e);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=document.createElement("div");d.style.padding="6px";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("export")+" "+mxResources.get("image"));e.style.marginTop=
"0px";e.style.marginBottom="8px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,140,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e){var f=this.editor.graph,g=document.createElement("div");g.style.paddingTop="10px";g.style.paddingRight=
"8px";var q=240,v=this.addCheckbox(g,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background),u=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.setAttribute("type","checkbox");e&&(g.appendChild(x),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),q+=26);f.isSelectionEmpty()&&x.setAttribute("disabled","disabled");var A=this.addCheckbox(g,mxResources.get("shadow"),
f.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&y.setAttribute("disabled","disabled");a&&(g.appendChild(y),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),q+=26);var z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");z.style.marginBottom="8px";z.setAttribute("checked","checked");z.defaultChecked=
!0;g.appendChild(z);mxUtils.write(g,mxResources.get("includeCopyOfMyDiagram"));a=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,v.checked,!u.checked,A.checked,z.checked,y.checked,x.checked)}),mxResources.get("zoom")+" (%)",null,g,!this.isOffline()?c:null);this.showDialog(a.container,320,q,!0,!0);a.init()};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,q){var v=this.getCurrentFile(),u=[];d&&(u.push("chrome\x3d0"),u.push("lightbox\x3d1"),"auto"!=a&&u.push("target\x3d"+a),null!=
b&&b!=mxConstants.NONE&&u.push("highlight\x3d"+("#"==b.charAt(0)?b.substring(1):b)),e&&u.push("edit\x3d_blank"),f&&u.push("layers\x3d1"));null!=v&&null!=v.getTitle()&&u.push("title\x3d"+encodeURIComponent(v.getTitle()));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&u.push("page\x3d"+a);break}a="";null!=g?a="#U"+encodeURIComponent(g):(v=this.getCurrentFile(),a=!q&&null!=v&&v.constructor==DriveFile?"#"+v.getHash():"#R"+encodeURIComponent(c?
this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<u.length?"?"+u.join("\x26"):"")+a};EditorUi.prototype.showEmbedHtmlDialog=function(a,b){var c=document.createElement("div");c.style.padding="6px";c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("html"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
c.appendChild(d);d=document.createElement("div");d.style.cssText="border-bottom:1px solid lightGray;padding-bottom:6px;margin-bottom:8px;";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","type-embedhtmldialog");var f=e.cloneNode(!0);f.setAttribute("value","copy");d.appendChild(f);var g=document.createElement("span");mxUtils.write(g,mxResources.get("includeCopyOfMyDiagram"));
d.appendChild(g);mxUtils.br(d);d.appendChild(e);g=document.createElement("span");mxUtils.write(g,mxResources.get("publicDiagramUrl"));d.appendChild(g);var q=this.getCurrentFile();null==a&&(null!=q&&q.constructor==DriveFile)&&(g=document.createElement("a"),g.style.paddingLeft="12px",g.style.color="gray",g.setAttribute("href","javascript:void(0);"),mxUtils.write(g,mxResources.get("share")),d.appendChild(g),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(q.getId())})));
f.setAttribute("checked","checked");null==a&&e.setAttribute("disabled","disabled");c.appendChild(d);var v=this.addLinkSection(c),u=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="40px";x.style.marginLeft="6px";x.style.marginRight="12px";x.value="100%";c.appendChild(x);var A=this.addCheckbox(c,mxResources.get("fit"),!0),d=null!=this.pages&&1<this.pages.length,y=
y=this.addCheckbox(c,mxResources.get("allPages"),d,!d),z=this.addCheckbox(c,mxResources.get("layers"),!0),D=this.addCheckbox(c,mxResources.get("lightbox"),!0),B=this.addCheckbox(c,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";B.style.marginBottom="8px";mxEvent.addListener(D,"change",function(){D.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")});c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(e.checked?a:null,u.checked,x.value,v.getTarget(),v.getColor(),
A.checked,y.checked,z.checked,D.checked,B.checked)}),null,mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542-how-to-embed-html-");this.showDialog(c.container,320,360,!0,!0);v.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.padding="6px";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";f.appendChild(g);
var q=this.getCurrentFile();a=0;if(null!=q&&q.constructor==DriveFile&&!b){a=80;g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;padding-top:6px;margin-bottom:12px;text-align:center;";mxUtils.write(g,mxResources.get("linkAccountRequired"));mxUtils.br(g);var v=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(q.getId())}));v.style.marginTop="12px";v.className="geBtn";g.appendChild(v);f.appendChild(g);
v=document.createElement("a");v.style.paddingLeft="12px";v.style.color="gray";v.style.fontSize="11px";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("check"));g.appendChild(v);mxEvent.addListener(v,"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,340,80,!0,!1);a.init()}))}))}var u=null,x=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",u.value="100%",f.appendChild(u),mxUtils.write(f,mxResources.get("height")+":"),x=document.createElement("input"),x.setAttribute("type","text"),
x.style.width="50px",x.style.marginLeft="6px",x.style.marginBottom="10px",x.value=d+"px",f.appendChild(x),mxUtils.br(f);var A=this.addLinkSection(f);c=null!=this.pages&&1<this.pages.length;var y=null;if(null==q||q.constructor!=DriveFile||b)y=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var z=this.addCheckbox(f,mxResources.get("lightbox"),!0),D=this.addCheckbox(f,mxResources.get("showEditButton"),!0);D.style.marginLeft="24px";var B=this.addCheckbox(f,mxResources.get("layers"),!0);B.style.marginLeft=
D.style.marginLeft;B.style.marginBottom="4px";mxEvent.addListener(z,"change",function(){z.checked?(B.removeAttribute("disabled"),D.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(A.getTarget(),A.getColor(),null==y?!0:y.checked,z.checked,D.checked,B.checked,null!=u?u.value:null,null!=x?x.value:null)}),null,mxResources.get("create"));this.showDialog(b.container,280,240+a,!0,!0);null!=
u?(u.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)):A.focus()};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.padding="6px";var g=this.editor.graph;if(null!=b){var q=document.createElement("h3");mxUtils.write(q,b);q.style.marginTop="0px";q.style.marginBottom="8px";f.appendChild(q)}var v=this.addCheckbox(f,mxResources.get("fit"),!0),u=this.addCheckbox(f,mxResources.get("shadow"),
g.shadowVisible&&d,!d),x=this.addCheckbox(f,c),A=this.addCheckbox(f,mxResources.get("lightbox"),!0),y=this.addCheckbox(f,mxResources.get("showEditButton"),!0);y.style.marginLeft="24px";var z=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(f,mxResources.get("layers"),z,!z);D.style.marginLeft=y.style.marginLeft;D.style.marginBottom="8px";mxEvent.addListener(A,"change",function(){A.checked?(z&&D.removeAttribute("disabled"),y.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),
y.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(v.checked,u.checked,x.checked,A.checked,y.checked,D.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,q){function v(b){var l=" ",v="";d&&(l=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",v+="cursor:pointer;");a&&(v+="max-width:100%;");var q="";c&&(q=' width\x3d"'+Math.round(u.width)+'" height\x3d"'+Math.round(u.height)+'"');g('\x3cimg src\x3d"'+b+'"'+q+(""!=v?' style\x3d"'+v+'"':"")+l+"/\x3e")}var u=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createPngDataUri(a,b);v(a)}),null,null,null,mxUtils.bind(this,
function(a){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),u.width*u.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var x="";c&&(x="\x26w\x3d"+Math.round(2*u.width)+"\x26h\x3d"+Math.round(2*u.height));var A=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(d?"1":"0")+x+"\x26xml\x3d"+encodeURIComponent(b));A.send(mxUtils.bind(this,function(){200==A.getStatus()?v("data:image/png;base64,"+A.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var q=this.editor.graph.getSvg(),v=q.getElementsByTagName("a");if(null!=v)for(var u=0;u<v.length;u++){var x=v[u].getAttribute("href");null!=x&&("#"==x.charAt(0)&&"_blank"==v[u].getAttribute("target"))&&v[u].removeAttribute("target")}d&&q.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(q);if(c){var A=" ",y="";d&&(A="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
@ -7678,7 +7676,7 @@ c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.max
a.length,C=B,F=[],H=mxUtils.bind(this,function(a,b){F[a]=b;if(0==--C){this.spinner.stop();if(null!=q)q(F);else{var c=[];z.getModel().beginUpdate();try{for(var d=0;d<F.length;d++){var e=F[d]();null!=e&&(c=c.concat(e))}}finally{z.getModel().endUpdate()}}f(c)}}),G=0;G<B;G++)mxUtils.bind(this,function(f){var q=a[f],s=new FileReader;s.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,s=k.indexOf(","),y=
atob(k.substring(s+1)),z=mxUtils.parseXml(y),y=z.getElementsByTagName("svg");if(0<y.length){var y=y[0],B=A?null:y.getAttribute("content");null!=B&&("\x3c"!=B.charAt(0)&&"%"!=B.charAt(0))&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null!=B&&("\x3cmxfile "===B.substring(0,8)||"\x3cmxGraphModel "===B.substring(0,14))?H(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*D,c+f*D,0,0,q.name)})):H(f,mxUtils.bind(this,function(){try{if(k.substring(0,
s+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],u=parseFloat(g.getAttribute("width")),v=parseFloat(g.getAttribute("height")),x=g.getAttribute("viewBox");if(null==x||0==x.length)g.setAttribute("viewBox","0 0 "+u+" "+v);else if(isNaN(u)||isNaN(v)){var A=x.split(" ");3<A.length&&(u=parseFloat(A[2]),v=parseFloat(A[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var t=Math.min(1,Math.min(d/Math.max(1,u)),d/Math.max(1,v));return e(k,q.type,b+f*D,c+f*D,Math.max(1,Math.round(u*
t)),Math.max(1,Math.round(v*t)),q.name)}}}catch(y){}return null}))}}else{y=!1;if("image/png"==q.type){var C=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var F=new Image;F.src=a.target.result;H(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*D,c+f*D,F.width,F.height,q.name)}));y=!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
t)),Math.max(1,Math.round(v*t)),q.name)}}}catch(y){}return null}))}}else{y=!1;if("image/png"==q.type){var C=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var G=new Image;G.src=a.target.result;H(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*D,c+f*D,G.width,G.height,q.name)}));y=!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(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,k,x){H(f,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var s=!v||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/x));return e(g,q.type,b+f*D,c+f*D,Math.round(k*s),Math.round(x*s),q.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),v,d,x)})))}else e(a.target.result,q.type,b+f*D,c+f*D,240,160,q.name,function(a){H(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*D,c+f*D,240,160,q.name,function(a){H(f,function(){return a})},q):"image"==q.type.substring(0,5)?s.readAsDataURL(q):s.readAsText(q)})(G)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var v=Math.max(g/e,q/e);if(1<v){var u=Math.round(g/v),x=Math.round(q/v),A=document.createElement("canvas");A.width=u;A.height=x;A.getContext("2d").drawImage(a,0,0,u,x);var y=A.toDataURL();if(y.length<b.length){var z=
@ -8131,11 +8129,12 @@ ChatWindow.prototype.htmlEscape=function(a){return a.replace(/&/g,"\x26amp;").re
App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.DROPBOX_APPKEY="libwls2fa9szdji";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js"};
App.getStoredMode=function(){var a=null;if("undefined"!=typeof Storage)for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE\x3d"==d.substring(0,5)){a=d.substring(5);break}}return a};
(function(){if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"==urlParams.chrome&&(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,2)?mxscript("https://www.dropbox.com/static/api/1/dropins.js",null,"dropboxjs",App.DROPBOX_APPKEY):"0"==urlParams.chrome&&
(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),
"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0<a.length)App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)};if(null!=c)for(var f=c.split(";"),c=0;c<f.length;c++){var d=App.pluginRegistry[f[c]];null!=d?mxscript(d):null!=window.console&&console.log("Unknown plugin:",f[c])}if(null!=a&&0<a.length&&"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;d=!0;for(c=0;c<a.length&&
d;c++)"/"!=a[c].charAt(0)&&a[c].substring(0,f.length)!=f&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("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",[a.join("\n")]).replace(/\\n/g,"\n")))for(c=0;c<a.length;c++)try{mxscript(a[c])}catch(b){}}}})();
(function(){if(!mxClient.IS_CHROMEAPP){"1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode()));if(null!=window.mxscript){if("1"!=urlParams.embed){if("function"===typeof window.DriveClient)if("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode))if(App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2))mxscript("https://apis.google.com/js/api.js");else{if("0"==urlParams.chrome&&(null==window.location.hash||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"!==window.location.hash.substring(0,45)))window.DriveClient=null}else window.DriveClient=null;"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?mxscript("https://www.dropbox.com/static/api/1/dropins.js",null,"dropboxjs",App.DROPBOX_APPKEY):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null);"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==
urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=null)}"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0<a.length)App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)};if(null!=c)for(var f=c.split(";"),c=0;c<f.length;c++){var d=App.pluginRegistry[f[c]];null!=d?mxscript(d):null!=window.console&&console.log("Unknown plugin:",
f[c])}if(null!=a&&0<a.length&&"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;d=!0;for(c=0;c<a.length&&d;c++)"/"!=a[c].charAt(0)&&a[c].substring(0,f.length)!=f&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("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",[a.join("\n")]).replace(/\\n/g,
"\n")))for(c=0;c<a.length;c++)try{mxscript(a[c])}catch(b){}}}}})();
App.main=function(a){var c=null;window.onerror=function(a,b,e,f,k){try{if(!(a==c||null!=a&&null!=b&&(-1!=a.indexOf("Script error")||-1!=a.indexOf("extension")))&&null!=a&&0>a.indexOf("DocumentClosedError")){c=a;var l=new Image,n=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";l.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3d"+n+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+
"\x26msg\x3dclientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"\x26stack\x3d"+encodeURIComponent(k.stack):"")}}catch(m){}};"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var f=document.createElement("iframe");
f.setAttribute("width","0");f.setAttribute("height","0");f.setAttribute("src","offline.html");document.body.appendChild(f);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(a){return mxStencilRegistry.stencils[a]};mxStencilRegistry.loadStencilSet=function(a,b,c){a=a.substring(a.indexOf("/")+1);a="mxgraph."+a.substring(0,a.length-4).replace(/\//g,".");a=mxStencilRegistry.stencilSet[a];null!=a&&mxStencilRegistry.parseStencilSet(a,b,!1)};for(f=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=
@ -8231,10 +8230,10 @@ mxUtils.bind(this,function(a){g();this.handleError(a)}))}};
App.prototype.loadFile=function(a,c,f){this.hideDialog();f=mxUtils.bind(this,function(){if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var d=localStorage.getItem(a);if(null!=d)this.fileLoaded(new StorageFile(this,d,a));else throw{message:mxResources.get("fileNotFound")};}catch(b){this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=e)this.spinner.stop(),this.fileLoaded(e);else if("R"==a.charAt(0)){this.spinner.stop();d=decodeURIComponent(a.substring(1));"\x3c"!=d.charAt(0)&&(d=this.editor.graph.decompress(d));var e=new LocalFile(this,d,null!=urlParams.title?
decodeURIComponent(urlParams.title):this.defaultFilename);e.getHash=function(){return a};this.fileLoaded(e);this.setMode(null)}else if("U"==a.charAt(0)){var f=decodeURIComponent(a.substring(1));this.loadTemplate(f,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=f,m=f.lastIndexOf("."),p=e.lastIndexOf("/");if(m>p&&0<p&&(e=e.substring(p+1,m),m=f.substring(m),".png"==m&&(m=".xml"),".svg"===m||
".xml"===m||".html"===m))d=e+m}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):d);b.getHash=function(){return a};this.fileLoaded(b)?this.setMode(null):"https://drive.google.com/uc?id\x3d"==f.substring(0,31)&&(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+f.substring(31,f.lastIndexOf("\x26")),c),!0):!1}),!b()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",
b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else d=null,"G"==a.charAt(0)?d=this.drive:"D"==a.charAt(0)?d=this.dropbox:"W"==a.charAt(0)&&(d=this.oneDrive),null==d?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),
d.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))});null==a||0==a.length?(this.editor.setStatus(""),this.fileLoaded(null)):null!=this.getCurrentFile()&&
!this.isDiagramEmpty()&&!c?window.openWindow(this.getUrl()+"#"+a,null,f):f()};
".xml"===m||".html"===m))d=e+m}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):d);b.getHash=function(){return a};this.fileLoaded(b)?this.setMode(null):"https://drive.google.com/uc?id\x3d"==f.substring(0,31)&&(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+f.substring(31,f.lastIndexOf("\x26")),c),!0):!1}),!b()&&("function"===typeof window.DriveClient&&this.spinner.spin(document.body,mxResources.get("loading")))&&
this.addListener("clientLoaded",b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else d=null,"G"==a.charAt(0)?d=this.drive:"D"==a.charAt(0)?d=this.dropbox:"W"==a.charAt(0)&&(d=this.oneDrive),null==d?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?
a.getHash():""})):(a=decodeURIComponent(a.substring(1)),d.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))});null==a||0==a.length?(this.editor.setStatus(""),
this.fileLoaded(null)):null!=this.getCurrentFile()&&!this.isDiagramEmpty()&&!c?window.openWindow(this.getUrl()+"#"+a,null,f):f()};
App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(c){if(null!=c)for(var d=0;d<c.length;d++){var b=encodeURIComponent(decodeURIComponent(c[d]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0,
1);if("L"==c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(f){a(b)}}else if("U"==c){var n=decodeURIComponent(b.substring(1));this.isOffline()||mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(n),mxUtils.bind(this,function(c){if(200==c.getStatus())try{this.loadLibrary(new UrlLibrary(this,

File diff suppressed because it is too large Load diff

443
war/js/atlas.min.js vendored
View file

@ -3,7 +3,7 @@
d[e])}return b}function g(b){this.opts=e(b||{},g.defaults,s)}function k(){function d(b,e){return a("\x3c"+b+' xmlns\x3d"urn:schemas-microsoft.com:vml" class\x3d"spin-vml"\x3e',e)}p.addRule(".spin-vml","behavior:url(#default#VML)");g.prototype.lines=function(a,e){function f(){return b(d("group",{coordsize:m+" "+m,coordorigin:-l+" "+-l}),{width:m,height:m})}function g(a,k,m){c(n,c(b(f(),{rotation:360/e.lines*a+"deg",left:~~k}),c(b(d("roundrect",{arcsize:e.corners}),{width:l,height:e.width,left:e.radius,
top:-e.width>>1,filter:m}),d("fill",{color:"string"==typeof e.color?e.color:e.color[a%e.color.length],opacity:e.opacity}),d("stroke",{opacity:0}))))}var k,l=e.length+e.width,m=2*l;k=2*-(e.width+e.length)+"px";var n=b(f(),{position:"absolute",top:k,left:k});if(e.shadow)for(k=1;k<=e.lines;k++)g(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(k=1;k<=e.lines;k++)g(k);return c(a,n)};g.prototype.opacity=function(b,a,d,e){b=b.firstChild;e=e.shadow&&
e.lines||0;b&&a+e<b.childNodes.length&&(b=b.childNodes[a+e],b=b&&b.firstChild,b=b&&b.firstChild,b&&(b.opacity=d))}}var l,m=["webkit","Moz","ms","O"],n={},p=function(){var b=a("style",{type:"text/css"});return c(document.getElementsByTagName("head")[0],b),b.sheet||b.styleSheet}(),s={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:0.25,fps:20,zIndex:2E9,className:"spinner",top:"50%",left:"50%",position:"absolute"};g.defaults={};e(g.prototype,
{spin:function(d){this.stop();var e=this,c=e.opts,f=e.el=b(a(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex});c.radius+c.length+c.width;if(d&&(d.insertBefore(f,d.firstChild||null),b(f,{left:c.left,top:c.top})),f.setAttribute("role","progressbar"),e.lines(f,e.opts),!l){var g,k=0,m=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,t=(1-c.opacity)/(p*c.trail/100),s=p/c.lines;!function I(){k++;for(var b=0;b<c.lines;b++)g=Math.max(1-(k+(c.lines-b)*s)%p*t,c.opacity),e.opacity(f,
{spin:function(d){this.stop();var e=this,c=e.opts,f=e.el=b(a(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex});c.radius+c.length+c.width;if(d&&(d.insertBefore(f,d.firstChild||null),b(f,{left:c.left,top:c.top})),f.setAttribute("role","progressbar"),e.lines(f,e.opts),!l){var g,k=0,m=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,s=(1-c.opacity)/(p*c.trail/100),t=p/c.lines;!function I(){k++;for(var b=0;b<c.lines;b++)g=Math.max(1-(k+(c.lines-b)*t)%p*s,c.opacity),e.opacity(f,
b*c.direction+m,g,c);e.timeout=e.el&&setTimeout(I,~~(1E3/n))}()}return e},stop:function(){var b=this.el;return b&&(clearTimeout(this.timeout),b.parentNode&&b.parentNode.removeChild(b),this.el=void 0),this},lines:function(d,e){function g(d,c){return b(a(),{position:"absolute",width:e.length+e.width+"px",height:e.width+"px",background:d,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/e.lines*m+e.rotate)+"deg) translate("+e.radius+"px,0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(var k,
m=0,n=(e.lines-1)*(1-e.direction)/2;m<e.lines;m++)k=b(a(),{position:"absolute",top:1+~(e.width/2)+"px",transform:e.hwaccel?"translate3d(0,0,0)":"",opacity:e.opacity,animation:l&&f(e.opacity,e.trail,n+m*e.direction,e.lines)+" "+1/e.speed+"s linear infinite"}),e.shadow&&c(k,b(g("#000","0 0 4px #000"),{top:"2px"})),c(d,c(k,g("string"==typeof e.color?e.color:e.color[m%e.color.length],"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(b,a,d){a<b.childNodes.length&&(b.childNodes[a].style.opacity=d)}});
var t=b(a("group"),{behavior:"url(#default#VML)"});return!d(t,"transform")&&t.adj?k():l=d(t,"animation"),g});
@ -35,30 +35,30 @@ cssLitGroup:[b[36],b[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[b[0]
"rect()":{cssPropBits:5,cssLitGroup:[b[48],b[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[b[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius","rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius",
"scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay","translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},g;for(g in e)"string"===typeof e[g]&&Object.hasOwnProperty.call(e,g)&&(e[g]=e[e[g]]);"undefined"!==typeof window&&(window.cssSchema=e);var k,l;(function(){function b(a){var d=
parseInt(a.substring(1),16);return 65535<d?(d-=65536,String.fromCharCode(55296+(d>>10),56320+(d&1023))):d==d?String.fromCharCode(d):" ">a[1]?"":a[1]}function a(b,d){return'"'+b.replace(/[\u0000-\u001f\\\"<>]/g,d)+'"'}function d(b){return c[b]||(c[b]="\\"+b.charCodeAt(0).toString(16)+" ")}function e(b){return f[b]||(f[b]=("\u0010">b?"%0":"%")+b.charCodeAt(0).toString(16))}var c={"\\":"\\\\"},f={"\\":"%5c"},g=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]\x3d|[^\"'\\\\/]|/(?![/*])",
"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(a){return a.replace(m,b)};k=function(b){b=(""+b).replace(/\r\n?/g,"\n").match(g)||[];for(var c=0,f=" ",k=0,m=b.length;k<m;++k){var p=l(b[k]),q=p.length,t=p.charCodeAt(0),p=34==t||39==t?a(p.substring(1,q-1),d):47==t&&1<q||"\\"==p||"--\x3e"==p||"\x3c!--"==p||"\ufeff"==
p||32>=t?" ":/url\(/i.test(p)?"url("+a(p.replace(n,""),e)+")":p;if(f!=p||" "!=p)b[c++]=f=p}b.length=c;return b}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var m=function(){function b(a){a=(""+a).match(n);return!a?f:new g(k(a[1]),k(a[2]),k(a[3]),k(a[4]),k(a[5]),k(a[6]),k(a[7]))}function a(b,e){return"string"==typeof b?encodeURI(b).replace(e,d):f}function d(b){b=b.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function e(b){if(b===
"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(a){return a.replace(m,b)};k=function(b){b=(""+b).replace(/\r\n?/g,"\n").match(g)||[];for(var c=0,f=" ",k=0,m=b.length;k<m;++k){var p=l(b[k]),q=p.length,s=p.charCodeAt(0),p=34==s||39==s?a(p.substring(1,q-1),d):47==s&&1<q||"\\"==p||"--\x3e"==p||"\x3c!--"==p||"\ufeff"==
p||32>=s?" ":/url\(/i.test(p)?"url("+a(p.replace(n,""),e)+")":p;if(f!=p||" "!=p)b[c++]=f=p}b.length=c;return b}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var m=function(){function b(a){a=(""+a).match(n);return!a?f:new g(k(a[1]),k(a[2]),k(a[3]),k(a[4]),k(a[5]),k(a[6]),k(a[7]))}function a(b,e){return"string"==typeof b?encodeURI(b).replace(e,d):f}function d(b){b=b.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function e(b){if(b===
f)return f;b=b.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var a=l,d;(d=b.replace(a,"$1"))!=b;b=d);return b}function c(b,a){var d=b.T(),f=a.K();f?d.ga(a.j):f=a.X();f?d.da(a.n):f=a.Y();f?d.ea(a.k):f=a.$();var g=a.g,k=e(g);if(f)d.ca(a.V()),k=k&&k.replace(m,"");else if(f=!!g){if(47!==k.charCodeAt(0))var k=e(d.g||"").replace(m,""),l=k.lastIndexOf("/")+1,k=e((l?k.substring(0,l):"")+e(g)).replace(m,"")}else k=k&&k.replace(m,""),k!==g&&d.G(k);f?d.G(k):f=a.aa();f?d.O(a.l):f=a.Z();f&&d.fa(a.o);
return d}function g(b,a,d,e,c,f,k){this.j=b;this.n=a;this.k=d;this.h=e;this.g=c;this.l=f;this.o=k}function k(b){return"string"==typeof b&&0<b.length?b:f}var l=RegExp(/(\/|^)(?:[^./][^/]*|\.{2,}(?:[^./][^/]*)|\.{3,}[^/]*)\/\.\.(?:\/|$)/),m=/^(?:\.\.\/)*(?:\.\.$)?/;g.prototype.toString=function(){var b=[];f!==this.j&&b.push(this.j,":");f!==this.k&&(b.push("//"),f!==this.n&&b.push(this.n,"@"),b.push(this.k),f!==this.h&&b.push(":",this.h.toString()));f!==this.g&&b.push(this.g);f!==this.l&&b.push("?",
this.l);f!==this.o&&b.push("#",this.o);return b.join("")};g.prototype.T=function(){return new g(this.j,this.n,this.k,this.h,this.g,this.l,this.o)};g.prototype.W=function(){return this.j&&decodeURIComponent(this.j).toLowerCase()};g.prototype.ga=function(b){this.j=b?b:f};g.prototype.K=function(){return f!==this.j};g.prototype.da=function(b){this.n=b?b:f};g.prototype.X=function(){return f!==this.n};g.prototype.ea=function(b){this.k=b?b:f;this.G(this.g)};g.prototype.Y=function(){return f!==this.k};g.prototype.V=
function(){return this.h&&decodeURIComponent(this.h)};g.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=f};g.prototype.$=function(){return f!==this.h};g.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};g.prototype.G=function(b){b?(b=""+b,this.g=!this.k||/^\//.test(b)?b:"/"+b):this.g=f};g.prototype.O=function(b){this.l=b?b:f};g.prototype.aa=function(){return f!==this.l};g.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="\x26",c&&a.push("\x3d",encodeURIComponent(c.toString()));this.l=a.join("")};g.prototype.fa=function(b){this.o=b?b:f};g.prototype.Z=function(){return f!==this.o};var n=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
p=/[#\/\?@]/g,q=/[\#\?]/g;g.parse=b;g.create=function(b,e,c,k,l,m,n){b=new g(a(b,p),a(e,p),"string"==typeof c?encodeURIComponent(c):f,0<k?k.toString():f,a(l,q),f,"string"==typeof n?encodeURIComponent(n):f);m&&("string"===typeof m?b.O(m.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):b.ba(m));return b};g.N=c;g.ma=e;g.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 g}();"undefined"!==typeof window&&(window.URI=
m);var n=a,p=a,s=a,t=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(B,g)+'")':'url("about:blank")'}function g(b){return C[b]}function k(b,a){return b?m.ha.N(b,a):a}function u(b,a,d){if(!d)return f;var e=(""+b).match(E);return e&&(!e[1]||G.test(e[1]))?d(b,a):f}function D(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var B=/[\n\f\r\"\'()*<>]/g,C={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function P(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,q=p&80,t=p&1536,s=NaN,x=0,I=0;x<c.length;++x){var z=c[x].toLowerCase(),E=z.charCodeAt(0),G,C,H,B,T,ja;if(32===E)z="";else if(34===E)z=16===q?f?b(u(k(g,l(c[x].substring(1,z.length-1))),d,f)):"":p&8&&!(q&q-1)?z:"";else if("inherit"!==z){if(T=n.cssLitGroup){var fa;if(!(fa=n.cssLitMap)){fa=
{};for(var ca=T.length;0<=--ca;)for(var ga=T[ca],ka=ga.length;0<=--ka;)fa[ga[ka]]=a;fa=n.cssLitMap=fa}T=fa}else T=a;if(!(ja=T,ja[D(z)]===a))if(35===E&&/^#(?:[0-9a-f]{3}){1,2}$/.test(z))z=p&2?z:"";else if(48<=E&&57>=E)z=p&1?z:"";else if(G=z.charCodeAt(1),C=z.charCodeAt(2),H=48<=G&&57>=G,B=48<=C&&57>=C,43===E&&(H||46===G&&B))z=p&1?(H?"":"0")+z.substring(1):"";else if(45===E&&(H||46===G&&B))z=p&4?(H?"-":"-0")+z.substring(1):p&1?"0":"";else if(46===E&&H)z=p&1?"0"+z:"";else if('url("'===z.substring(0,
5))z=f&&p&16?b(u(k(g,c[x].substring(5,z.length-2)),d,f)):"";else if("("===z.charAt(z.length-1))a:{T=c;fa=x;z=1;ca=fa+1;for(E=T.length;ca<E&&z;)ga=T[ca++],z+=")"===ga?-1:/^[^"']*\($/.test(ga);if(!z){z=T[fa].toLowerCase();E=D(z);T=T.splice(fa,ca-fa,"");fa=n.cssFns;ca=0;for(ga=fa.length;ca<ga;++ca)if(fa[ca].substring(0,E.length)==E){T[0]=T[T.length-1]="";P(fa[ca],T,f,g);z=z+T.join(" ")+")";break a}}z=""}else z=t&&/^-?[a-z_][\w\-]*$/.test(z)&&!/__$/.test(z)?m&&512===t?c[x]+m:1024===t&&e[z]&&"number"===
typeof e[z].oa?z:"":/^\w+$/.test(z)&&64===q&&p&8?s+1===I?(c[s]=c[s].substring(0,c[s].length-1)+" "+z+'"',""):(s=I,'"'+z+'"'):""}z&&(c[I++]=z)}1===I&&'url("about:blank")'===c[0]&&(I=0);c.length=I}}}();var I=RegExp("^(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)$"),
H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(b,a,e){function g(p,q){function t(e,f,g){var k,n,p,q,u,v=c;k="";if(e<f)if(u=b[e],"*"===u)++e,k=u;else if(/^[a-zA-Z]/.test(u)&&(n=m(u.toLowerCase(),[])))"tagName"in n&&(u=n.tagName),++e,k=u;for(q=p=n="";v&&e<f;++e)if(u=b[e],"#"===u.charAt(0))/^#_|__$|[^\w#:\-]/.test(u)?v=d:n+=u+l;else if("."===u)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(u=b[e])&&!/^_|__$/.test(u)?n+="."+u:v=d;else if(e+1<f&&"["===b[e]){++e;var z=b[e++].toLowerCase();u=x.m[k+"::"+z];u!==+u&&(u=x.m["*::"+
z]);var y;a.ia?(y=a.ia(k,z),"string"!==typeof y&&(v=d,y=z),v&&u!==+u&&(u=x.d.NONE)):(y=z,u!==+u&&(v=d));var E=z="",A=d;/^[~^$*|]?=$/.test(b[e])&&(z=b[e++],E=b[e++],/^[0-9A-Za-z:_\-]+$/.test(E)?E='"'+E+'"':"]"===E&&(E='""',--e),/^"([^\"\\]|\\.)*"$/.test(E)||(v=d),(A="i"===b[e])&&++e);"]"!==b[e]&&(++e,v=d);switch(u){case x.d.CLASSES:case x.d.LOCAL_NAME:case x.d.NONE:break;case x.d.GLOBAL_NAME:case x.d.ID:case x.d.IDREF:("\x3d"===z||"~\x3d"===z||"$\x3d"===z)&&'""'!=E&&!A?E='"'+E.substring(1,E.length-
1)+l+'"':"|\x3d"===z||""===z||(v=d);break;case x.d.URI:case x.d.URI_FRAGMENT:""!==z&&(v=d);break;default:v=d}v&&(p+="["+y.replace(/[^\w-]/g,"\\$\x26")+z+E+(A?" i]":"]"))}else if(e<f&&":"===b[e])if(u=b[++e],I.test(u))q+=":"+u;else break;else break;e!==f&&(v=d);v&&(e=(k+n).replace(/[^ .*#\w-]/g,"\\$\x26")+p+q+g)&&s.push(e);return v}" "===b[p]&&++p;q-1!==p&&" "===b[q]&&--q;for(var s=[],u=p,v=c,z=p;v&&z<q;++z){var y=b[z];if(H[y]===H||" "===y)t(u,z,y)?u=z+1:v=d}t(u,q,"")||(v=d);return v?(s.length&&(u=
s.join(""),k!==f&&(u="."+k+" "+u),n.push(u)),c):!e||e(b.slice(p,q))}var k=a.na,l=a.L,m=a.Aa,n=[],p=0,q,t=0,s;for(q=0;q<b.length;++q)if(s=b[q],"("==s||"["==s?(++t,c):")"==s||"]"==s?(t&&--t,c):!(" "==b[q]&&(t||H[b[q-1]]===H||H[b[q+1]]===H)))b[p++]=b[q];b.length=p;p=b.length;for(q=t=0;q<p;++q)if(","===b[q]){if(!g(t,q))return f;t=q+1}return!g(t,p)?f:n};(function(){var b=/^\w/,a=RegExp("^(?:(?:(?:(?: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|%)?)) )?\\))*))*$",
m);var n=a,p=a,s=a,t=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(B,g)+'")':'url("about:blank")'}function g(b){return C[b]}function k(b,a){return b?m.ha.N(b,a):a}function u(b,a,d){if(!d)return f;var e=(""+b).match(F);return e&&(!e[1]||G.test(e[1]))?d(b,a):f}function D(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var B=/[\n\f\r\"\'()*<>]/g,C={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
"\x3c":"%3c","\x3e":"%3e"},F=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function P(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,q=p&80,s=p&1536,t=NaN,x=0,I=0;x<c.length;++x){var z=c[x].toLowerCase(),F=z.charCodeAt(0),G,C,H,B,T,ja;if(32===F)z="";else if(34===F)z=16===q?f?b(u(k(g,l(c[x].substring(1,z.length-1))),d,f)):"":p&8&&!(q&q-1)?z:"";else if("inherit"!==z){if(T=n.cssLitGroup){var fa;if(!(fa=n.cssLitMap)){fa=
{};for(var ca=T.length;0<=--ca;)for(var ga=T[ca],ka=ga.length;0<=--ka;)fa[ga[ka]]=a;fa=n.cssLitMap=fa}T=fa}else T=a;if(!(ja=T,ja[D(z)]===a))if(35===F&&/^#(?:[0-9a-f]{3}){1,2}$/.test(z))z=p&2?z:"";else if(48<=F&&57>=F)z=p&1?z:"";else if(G=z.charCodeAt(1),C=z.charCodeAt(2),H=48<=G&&57>=G,B=48<=C&&57>=C,43===F&&(H||46===G&&B))z=p&1?(H?"":"0")+z.substring(1):"";else if(45===F&&(H||46===G&&B))z=p&4?(H?"-":"-0")+z.substring(1):p&1?"0":"";else if(46===F&&H)z=p&1?"0"+z:"";else if('url("'===z.substring(0,
5))z=f&&p&16?b(u(k(g,c[x].substring(5,z.length-2)),d,f)):"";else if("("===z.charAt(z.length-1))a:{T=c;fa=x;z=1;ca=fa+1;for(F=T.length;ca<F&&z;)ga=T[ca++],z+=")"===ga?-1:/^[^"']*\($/.test(ga);if(!z){z=T[fa].toLowerCase();F=D(z);T=T.splice(fa,ca-fa,"");fa=n.cssFns;ca=0;for(ga=fa.length;ca<ga;++ca)if(fa[ca].substring(0,F.length)==F){T[0]=T[T.length-1]="";P(fa[ca],T,f,g);z=z+T.join(" ")+")";break a}}z=""}else z=s&&/^-?[a-z_][\w\-]*$/.test(z)&&!/__$/.test(z)?m&&512===s?c[x]+m:1024===s&&e[z]&&"number"===
typeof e[z].oa?z:"":/^\w+$/.test(z)&&64===q&&p&8?t+1===I?(c[t]=c[t].substring(0,c[t].length-1)+" "+z+'"',""):(t=I,'"'+z+'"'):""}z&&(c[I++]=z)}1===I&&'url("about:blank")'===c[0]&&(I=0);c.length=I}}}();var I=RegExp("^(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)$"),
H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(b,a,e){function g(p,q){function s(e,f,g){var k,n,p,q,u,v=c;k="";if(e<f)if(u=b[e],"*"===u)++e,k=u;else if(/^[a-zA-Z]/.test(u)&&(n=m(u.toLowerCase(),[])))"tagName"in n&&(u=n.tagName),++e,k=u;for(q=p=n="";v&&e<f;++e)if(u=b[e],"#"===u.charAt(0))/^#_|__$|[^\w#:\-]/.test(u)?v=d:n+=u+l;else if("."===u)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(u=b[e])&&!/^_|__$/.test(u)?n+="."+u:v=d;else if(e+1<f&&"["===b[e]){++e;var z=b[e++].toLowerCase();u=x.m[k+"::"+z];u!==+u&&(u=x.m["*::"+
z]);var y;a.ia?(y=a.ia(k,z),"string"!==typeof y&&(v=d,y=z),v&&u!==+u&&(u=x.d.NONE)):(y=z,u!==+u&&(v=d));var F=z="",A=d;/^[~^$*|]?=$/.test(b[e])&&(z=b[e++],F=b[e++],/^[0-9A-Za-z:_\-]+$/.test(F)?F='"'+F+'"':"]"===F&&(F='""',--e),/^"([^\"\\]|\\.)*"$/.test(F)||(v=d),(A="i"===b[e])&&++e);"]"!==b[e]&&(++e,v=d);switch(u){case x.d.CLASSES:case x.d.LOCAL_NAME:case x.d.NONE:break;case x.d.GLOBAL_NAME:case x.d.ID:case x.d.IDREF:("\x3d"===z||"~\x3d"===z||"$\x3d"===z)&&'""'!=F&&!A?F='"'+F.substring(1,F.length-
1)+l+'"':"|\x3d"===z||""===z||(v=d);break;case x.d.URI:case x.d.URI_FRAGMENT:""!==z&&(v=d);break;default:v=d}v&&(p+="["+y.replace(/[^\w-]/g,"\\$\x26")+z+F+(A?" i]":"]"))}else if(e<f&&":"===b[e])if(u=b[++e],I.test(u))q+=":"+u;else break;else break;e!==f&&(v=d);v&&(e=(k+n).replace(/[^ .*#\w-]/g,"\\$\x26")+p+q+g)&&t.push(e);return v}" "===b[p]&&++p;q-1!==p&&" "===b[q]&&--q;for(var t=[],u=p,v=c,z=p;v&&z<q;++z){var y=b[z];if(H[y]===H||" "===y)s(u,z,y)?u=z+1:v=d}s(u,q,"")||(v=d);return v?(t.length&&(u=
t.join(""),k!==f&&(u="."+k+" "+u),n.push(u)),c):!e||e(b.slice(p,q))}var k=a.na,l=a.L,m=a.Aa,n=[],p=0,q,s=0,t;for(q=0;q<b.length;++q)if(t=b[q],"("==t||"["==t?(++s,c):")"==t||"]"==t?(s&&--s,c):!(" "==b[q]&&(s||H[b[q-1]]===H||H[b[q+1]]===H)))b[p++]=b[q];b.length=p;p=b.length;for(q=s=0;q<p;++q)if(","===b[q]){if(!g(s,q))return f;s=q+1}return!g(s,p)?f:n};(function(){var b=/^\w/,a=RegExp("^(?:(?:(?:(?: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");t=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)?"not all":b.test(d)?d:"not all , "+d}})();(function(){function b(a){var d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,c=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=d.exec(a))||(k=e.exec(a))||(k=c.exec(a))||(k=g.exec(a))?k[1]:f}function e(g,l,m,s,x,v,I){function z(){H=
C.length&&C[C.length-1]===f}var E=a,G=I||[0],C=[],H=d;q(l,{startStylesheet:function(){E=[]},endStylesheet:function(){},startAtrule:function(a,d){if(H)a=f;else if("@media"===a)E.push("@media"," ",t(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(E.push(a," ",c+m.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof v){var l=t(d.slice(1));if("not all"!==l){++G[0];var n=[];E.push(n);var p=u(k(g,b(d[0])),function(b){var a=
e(p,b.qa,m,s,x,v,G);--G[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;n[0]=b;v(b,!!G[0])},x)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");H=!a;C.push(a)},endAtrule:function(){C.pop();H||E.push(";");z()},startBlock:function(){H||E.push("{")},endBlock:function(){H||(E.push("}"),H=c)},startRuleset:function(b){if(!H){var d=a;"@keyframes"===C[C.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
H=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,m),!b||!b.length?H=c:d=b.join(", "));H||E.push(d,"{")}C.push(f)},endRuleset:function(){C.pop();H||E.push("}");z()},declaration:function(b,a){if(!H){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);n(b,a,s,g,m.L);a.length&&E.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return E.join("")}},va:!!G[0]}}s=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
C.length&&C[C.length-1]===f}var F=a,G=I||[0],C=[],H=d;q(l,{startStylesheet:function(){F=[]},endStylesheet:function(){},startAtrule:function(a,d){if(H)a=f;else if("@media"===a)F.push("@media"," ",t(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(F.push(a," ",c+m.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof v){var l=t(d.slice(1));if("not all"!==l){++G[0];var n=[];F.push(n);var p=u(k(g,b(d[0])),function(b){var a=
e(p,b.qa,m,s,x,v,G);--G[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;n[0]=b;v(b,!!G[0])},x)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");H=!a;C.push(a)},endAtrule:function(){C.pop();H||F.push(";");z()},startBlock:function(){H||F.push("{")},endBlock:function(){H||(F.push("}"),H=c)},startRuleset:function(b){if(!H){var d=a;"@keyframes"===C[C.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
H=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,m),!b||!b.length?H=c:d=b.join(", "));H||F.push(d,"{")}C.push(f)},endRuleset:function(){C.pop();H||F.push("}");z()},declaration:function(b,a){if(!H){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);n(b,a,s,g,m.L);a.length&&F.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!G[0]}}s=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
typeof window&&(window.sanitizeCssProperty=n,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=s,window.sanitizeMediaQuery=t);var q,u;(function(){function b(d,e,c,f,g){for(var k=e++;e<c&&"{"!==d[e]&&";"!==d[e];)++e;if(e<c&&(g||";"===d[e])){g=k+1;var l=e;g<c&&" "===d[g]&&++g;l>g&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();f<g;){var l=
c[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?b(c,f,g,k,d):"{"===l?a(c,f,g,k):e(c,f,g,k)}k.endBlock&&k.endBlock();return f}function e(b,a,d,g){var k=a,m=f(b,a,d,c);if(0>m)return m=~m,m===k?m+1:m;var n=b[m];if("{"!==n)return m===k?m+1:m;a=m+1;m>k&&" "===b[m-1]&&--m;for(g.startRuleset&&g.startRuleset(b.slice(k,m));a<d;){n=b[a];if("}"===n){++a;break}a=" "===n?a+1:l(b,a,d,g)}g.endRuleset&&g.endRuleset();return a}function f(b,a,d,e){for(var c,g=[],k=-1;a<d;++a)if(c=b[a].charAt(0),
"["===c||"("===c)g[++k]=c;else if("]"===c&&"["===g[k]||")"===c&&"("===g[k])--k;else if("{"===c||"}"===c||";"===c||"@"===c||":"===c&&!e)break;0<=k&&(a=~(a+1));return a}function g(b,a,d){for(;a<d&&";"!==b[a]&&"}"!==b[a];)++a;return a<d&&";"===b[a]?a+1:a}function l(b,a,e,c){var k=b[a++];if(!m.test(k))return g(b,a,e);a<e&&" "===b[a]&&++a;if(a==e||":"!==b[a])return g(b,a,e);++a;a<e&&" "===b[a]&&++a;var n=f(b,a,e,d);if(0>n)n=~n;else{for(var p=[],q=0,t=a;t<n;++t)a=b[t]," "!==a&&(p[q++]=a);if(n<e){do{a=b[n];
"["===c||"("===c)g[++k]=c;else if("]"===c&&"["===g[k]||")"===c&&"("===g[k])--k;else if("{"===c||"}"===c||";"===c||"@"===c||":"===c&&!e)break;0<=k&&(a=~(a+1));return a}function g(b,a,d){for(;a<d&&";"!==b[a]&&"}"!==b[a];)++a;return a<d&&";"===b[a]?a+1:a}function l(b,a,e,c){var k=b[a++];if(!m.test(k))return g(b,a,e);a<e&&" "===b[a]&&++a;if(a==e||":"!==b[a])return g(b,a,e);++a;a<e&&" "===b[a]&&++a;var n=f(b,a,e,d);if(0>n)n=~n;else{for(var p=[],q=0,s=a;s<n;++s)a=b[s]," "!==a&&(p[q++]=a);if(n<e){do{a=b[n];
if(";"===a||"}"===a)break;q=0}while(++n<e);";"===a&&++n}q&&c.declaration&&c.declaration(k.toLowerCase(),p)}return n}q=function(a,d){var f=k(a);d.startStylesheet&&d.startStylesheet();for(var g=0,l=f.length;g<l;)g=" "===f[g]?g+1:g<l?"@"===f[g].charAt(0)?b(f,g,l,d,c):e(f,g,l,d):g;d.endStylesheet&&d.endStylesheet()};var m=/^-?[a-z]/i;u=function(b,a){for(var d=k(b),e=0,c=d.length;e<c;)e=" "!==d[e]?l(d,e,c,a):e+1}})();"undefined"!==typeof window&&(window.parseCssStylesheet=q,window.parseCssDeclarations=
u);var x={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13}};x.atype=x.d;x.m={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,
"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::onreset":2,"*::onscroll":2,"*::onselect":2,"*::onsubmit":2,"*::ontouchcancel":2,"*::ontouchend":2,"*::ontouchenter":2,"*::ontouchleave":2,"*::ontouchmove":2,"*::ontouchstart":2,"*::onunload":2,"*::spellcheck":0,"*::style":3,"*::tabindex":0,"*::title":0,"*::translate":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::shape":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,
@ -82,17 +82,17 @@ time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"
x.URIEFFECTS=x.J;x.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};x.ltypes=x.M;x.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};x.LOADERTYPES=x.I;"undefined"!==typeof window&&(window.html4=x);b=function(b){function e(b,a){var d;if(O.hasOwnProperty(a))d=O[a];else{var c=a.match(M);d=c?String.fromCharCode(parseInt(c[1],10)):(c=a.match(Z))?String.fromCharCode(parseInt(c[1],
16)):J&&N.test(a)?(J.innerHTML="\x26"+a+";",c=J.textContent,O[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(X,e)}function k(b){return(""+b).replace(da,"\x26amp;").replace(aa,"\x26lt;").replace(ba,"\x26gt;").replace(Y,"\x26#34;")}function l(b){return b.replace(U,"\x26amp;$1").replace(aa,"\x26lt;").replace(ba,"\x26gt;")}function n(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,
e){var c,g=/(<\/|<\!--|<[!?]|[&<>])/g;c=b+"";if(ja)c=c.split(g);else{for(var k=[],l=0,m;(m=g.exec(c))!==f;)k.push(c.substring(l,m.index)),k.push(m[0]),l=m.index+m[0].length;k.push(c.substring(l));c=k}q(a,c,0,{r:d,C:d},e)}}function p(b,a,d,e,c){return function(){q(b,a,d,e,c)}}function q(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,m,n=d.length;e<n;){var u=d[e++],x=d[e];switch(u){case "\x26":ea.test(x)?(a.e&&a.e("\x26"+x,g,ca,p(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,ca,p(a,d,e,f,g));break;case "\x3c/":if(k=
/^([-\w:]+)[^\'\"]*/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1])e+=2,m=k[1].toLowerCase(),a.t&&a.t(m,g,ca,p(a,d,e,f,g));else{var z=d,y=e,E=a,A=g,F=ca,O=f,D=s(z,y);D?(E.t&&E.t(D.name,A,F,p(E,z,y,O,A)),e=D.next):e=z.length}else a.e&&a.e("\x26lt;/",g,ca,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1]){e+=2;m=k[1].toLowerCase();a.w&&a.w(m,[],g,ca,p(a,d,e,f,g));var H=b.f[m];H&fa&&(e=t(d,{name:m,next:e,c:H},a,g,ca,f))}else{var z=d,y=a,E=
g,A=ca,F=f,T=s(z,e);T?(y.w&&y.w(T.name,T.R,E,A,p(y,z,T.next,F,E)),e=T.c&fa?t(z,T,y,E,A,F):T.next):e=z.length}else a.e&&a.e("\x26lt;",g,ca,p(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<n&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<n){if(a.A){var S=d.slice(e,l).join("");a.A(S.substr(0,S.length-2),g,ca,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,ca,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(x)){if(!f.r){for(l=e+1;l<n&&"\x3e"!==d[l];l++);l<n?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
g,ca,p(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,ca,p(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<n&&"\x3e"!==d[l];l++);l<n?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,ca,p(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,ca,p(a,d,e,f,g));break;case "":break;default:a.e&&a.e(u,g,ca,p(a,d,e,f,g))}}a.B&&a.B(g)}catch(B){if(B!==ca)throw B;}}function t(a,d,e,c,f,g){var k=a.length;ga.hasOwnProperty(d.name)||(ga[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var m=ga[d.name],n=d.next,q=d.next+1;q<
k&&!("\x3c/"===a[q-1]&&m.test(a[q]));q++);q<k&&(q-=1);k=a.slice(n,q).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,p(e,a,q,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,p(e,a,q,g,c));else throw Error("bug");return q}function s(a,e){var f=/^([-\w:]+)/.exec(a[e]),k={};k.name=f[1].toLowerCase();k.c=b.f[k.name];for(var l=a[e].substr(f[0].length),m=e+1,n=a.length;m<n&&"\x3e"!==a[m];m++)l+=a[m];if(!(n<=m)){for(var p=[];""!==l;)if(f=T.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],q=d,l=[l,a[m++]];m<
n;m++){if(q){if("\x3e"===a[m])break}else 0<=a[m].indexOf(f)&&(q=c);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var q=f[1].toLowerCase(),t;if(f[2]){t=f[3];var u=t.charCodeAt(0);if(34===u||39===u)t=t.substr(1,t.length-2);t=g(t.replace(R,""))}else t="";p.push(q,t);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=m+1;return k}}function u(e){function c(b,a){l||a.push(b)}var g,l;return n({startDoc:function(){g=[];l=d},startTag:function(d,c,m){if(!l&&b.f.hasOwnProperty(d)){var n=
b.f[d];if(!(n&b.c.FOLDABLE)){var p=e(d,c);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)c=p.attribs;else throw Error("tagPolicy gave no attribs");var q;"tagName"in p?(q=p.tagName,p=b.f[q]):(q=d,p=n);if(n&b.c.OPTIONAL_ENDTAG){var t=g[g.length-1];t&&t.D===d&&(t.v!==q||d!==q)&&m.push("\x3c/",t.v,"\x3e")}n&b.c.EMPTY||g.push({D:d,v:q});m.push("\x3c",q);d=0;for(t=c.length;d<t;d+=2){var s=c[d],u=c[d+1];u!==f&&u!==a&&m.push(" ",s,'\x3d"',k(u),'"')}m.push("\x3e");
/^([-\w:]+)[^\'\"]*/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1])e+=2,m=k[1].toLowerCase(),a.t&&a.t(m,g,ca,p(a,d,e,f,g));else{var z=d,y=e,F=a,A=g,E=ca,O=f,D=t(z,y);D?(F.t&&F.t(D.name,A,E,p(F,z,y,O,A)),e=D.next):e=z.length}else a.e&&a.e("\x26lt;/",g,ca,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1]){e+=2;m=k[1].toLowerCase();a.w&&a.w(m,[],g,ca,p(a,d,e,f,g));var H=b.f[m];H&fa&&(e=s(d,{name:m,next:e,c:H},a,g,ca,f))}else{var z=d,y=a,F=
g,A=ca,E=f,T=t(z,e);T?(y.w&&y.w(T.name,T.R,F,A,p(y,z,T.next,E,F)),e=T.c&fa?s(z,T,y,F,A,E):T.next):e=z.length}else a.e&&a.e("\x26lt;",g,ca,p(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<n&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<n){if(a.A){var B=d.slice(e,l).join("");a.A(B.substr(0,B.length-2),g,ca,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,ca,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(x)){if(!f.r){for(l=e+1;l<n&&"\x3e"!==d[l];l++);l<n?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
g,ca,p(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,ca,p(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<n&&"\x3e"!==d[l];l++);l<n?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,ca,p(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,ca,p(a,d,e,f,g));break;case "":break;default:a.e&&a.e(u,g,ca,p(a,d,e,f,g))}}a.B&&a.B(g)}catch(S){if(S!==ca)throw S;}}function s(a,d,e,c,f,g){var k=a.length;ga.hasOwnProperty(d.name)||(ga[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var m=ga[d.name],n=d.next,q=d.next+1;q<
k&&!("\x3c/"===a[q-1]&&m.test(a[q]));q++);q<k&&(q-=1);k=a.slice(n,q).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,p(e,a,q,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,p(e,a,q,g,c));else throw Error("bug");return q}function t(a,e){var f=/^([-\w:]+)/.exec(a[e]),k={};k.name=f[1].toLowerCase();k.c=b.f[k.name];for(var l=a[e].substr(f[0].length),m=e+1,n=a.length;m<n&&"\x3e"!==a[m];m++)l+=a[m];if(!(n<=m)){for(var p=[];""!==l;)if(f=T.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],q=d,l=[l,a[m++]];m<
n;m++){if(q){if("\x3e"===a[m])break}else 0<=a[m].indexOf(f)&&(q=c);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var q=f[1].toLowerCase(),s;if(f[2]){s=f[3];var u=s.charCodeAt(0);if(34===u||39===u)s=s.substr(1,s.length-2);s=g(s.replace(R,""))}else s="";p.push(q,s);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=m+1;return k}}function u(e){function c(b,a){l||a.push(b)}var g,l;return n({startDoc:function(){g=[];l=d},startTag:function(d,c,m){if(!l&&b.f.hasOwnProperty(d)){var n=
b.f[d];if(!(n&b.c.FOLDABLE)){var p=e(d,c);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)c=p.attribs;else throw Error("tagPolicy gave no attribs");var q;"tagName"in p?(q=p.tagName,p=b.f[q]):(q=d,p=n);if(n&b.c.OPTIONAL_ENDTAG){var s=g[g.length-1];s&&s.D===d&&(s.v!==q||d!==q)&&m.push("\x3c/",s.v,"\x3e")}n&b.c.EMPTY||g.push({D:d,v:q});m.push("\x3c",q);d=0;for(s=c.length;d<s;d+=2){var t=c[d],u=c[d+1];u!==f&&u!==a&&m.push(" ",t,'\x3d"',k(u),'"')}m.push("\x3e");
n&b.c.EMPTY&&!(p&b.c.EMPTY)&&m.push("\x3c/",q,"\x3e")}else l=!(n&b.c.EMPTY)}}},endTag:function(a,e){if(l)l=d;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=g.length;0<=--c;){var f=g[c].D;if(f===a)break;if(!(b.f[f]&b.c.OPTIONAL_ENDTAG))return}else for(c=g.length;0<=--c&&g[c].D!==a;);if(!(0>c)){for(f=g.length;--f>c;){var k=g[f].v;b.f[k]&b.c.OPTIONAL_ENDTAG||e.push("\x3c/",k,"\x3e")}c<g.length&&(a=g[c].v);g.length=c;e.push("\x3c/",a,"\x3e")}}}},
pcdata:c,rcdata:c,cdata:c,endDoc:function(b){for(;g.length;g.length--)b.push("\x3c/",g[g.length-1].v,"\x3e")}})}function x(b,a,d,e,c){if(!c)return f;try{var g=m.parse(""+b);if(g&&(!g.K()||ka.test(g.W()))){var k=c(g,a,d,e);return k?k.toString():f}}catch(l){}return f}function L(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 P(b,a,d){a=a+"::"+d;if(b.hasOwnProperty(a))return b[a];
a="*::"+d;if(b.hasOwnProperty(a))return b[a]}function W(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var m=e[l],n=e[l+1],p=n,q=f,t;if((t=d+"::"+m,b.m.hasOwnProperty(t))||(t="*::"+m,b.m.hasOwnProperty(t)))q=b.m[t];if(q!==f)switch(q){case b.d.NONE:break;case b.d.SCRIPT:n=f;k&&L(k,d,m,p,n);break;case b.d.STYLE:if("undefined"===typeof F){n=f;k&&L(k,d,m,p,n);break}var s=[];F(n,{declaration:function(a,d){var e=a.toLowerCase();S(e,d,c?function(a){return x(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&
s.push(e+": "+d.join(" "))}});n=0<s.length?s.join(" ; "):f;k&&L(k,d,m,p,n);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:n=g?g(n):n;k&&L(k,d,m,p,n);break;case b.d.URI:n=x(n,P(b.J,d,m),P(b.I,d,m),{TYPE:"MARKUP",XML_ATTR:m,XML_TAG:d},c);k&&L(k,d,m,p,n);break;case b.d.URI_FRAGMENT:n&&"#"===n.charAt(0)?(n=n.substring(1),n=g?g(n):n,n!==f&&n!==a&&(n="#"+n)):n=f;k&&L(k,d,m,p,n);break;default:n=f,k&&L(k,d,m,p,n)}else n=f,k&&L(k,d,m,p,n);e[l+1]=
n}return e}function V(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:W(f,g,d,e,c)}}}function Q(b,a){var d=[];u(a)(b,d);return d.join("")}var F,S;"undefined"!==typeof window&&(F=window.parseCssDeclarations,S=window.sanitizeCssProperty);var O={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,Z=/^#x([0-9A-Fa-f]+)$/,N=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
a="*::"+d;if(b.hasOwnProperty(a))return b[a]}function W(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var m=e[l],n=e[l+1],p=n,q=f,s;if((s=d+"::"+m,b.m.hasOwnProperty(s))||(s="*::"+m,b.m.hasOwnProperty(s)))q=b.m[s];if(q!==f)switch(q){case b.d.NONE:break;case b.d.SCRIPT:n=f;k&&L(k,d,m,p,n);break;case b.d.STYLE:if("undefined"===typeof E){n=f;k&&L(k,d,m,p,n);break}var t=[];E(n,{declaration:function(a,d){var e=a.toLowerCase();S(e,d,c?function(a){return x(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&
t.push(e+": "+d.join(" "))}});n=0<t.length?t.join(" ; "):f;k&&L(k,d,m,p,n);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:n=g?g(n):n;k&&L(k,d,m,p,n);break;case b.d.URI:n=x(n,P(b.J,d,m),P(b.I,d,m),{TYPE:"MARKUP",XML_ATTR:m,XML_TAG:d},c);k&&L(k,d,m,p,n);break;case b.d.URI_FRAGMENT:n&&"#"===n.charAt(0)?(n=n.substring(1),n=g?g(n):n,n!==f&&n!==a&&(n="#"+n)):n=f;k&&L(k,d,m,p,n);break;default:n=f,k&&L(k,d,m,p,n)}else n=f,k&&L(k,d,m,p,n);e[l+1]=
n}return e}function V(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:W(f,g,d,e,c)}}}function Q(b,a){var d=[];u(a)(b,d);return d.join("")}var E,S;"undefined"!==typeof window&&(E=window.parseCssDeclarations,S=window.sanitizeCssProperty);var O={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,Z=/^#x([0-9A-Fa-f]+)$/,N=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
f,R=/\0/g,X=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ea=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,da=/&/g,U=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,aa=/[<]/g,ba=/>/g,Y=/\"/g,T=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ja=3==="a,b".split(/(,)/).length,fa=b.c.CDATA|b.c.RCDATA,ca={},ga={},ka=/^(?:https?|mailto|data)$/i,ha={};ha.pa=ha.escapeAttrib=k;ha.ra=ha.makeHtmlSanitizer=u;ha.sa=ha.makeSaxParser=n;ha.ta=ha.makeTagPolicy=V;ha.wa=ha.normalizeRCData=l;
ha.xa=ha.sanitize=function(b,a,d,e){return Q(b,V(a,d,e))};ha.ya=ha.sanitizeAttribs=W;ha.za=ha.sanitizeWithPolicy=Q;ha.Ba=ha.unescapeEntities=g;return ha}(x);g=b.sanitize;"undefined"!==typeof window&&(window.html=b,window.html_sanitize=g)})();
!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 n="function"==typeof require&&require;if(!m&&n)return n(k,!0);if(g)return g(k,!0);n=Error("Cannot find module '"+k+"'");throw n.code="MODULE_NOT_FOUND",n;}n=d[k]={exports:{}};
@ -102,8 +102,8 @@ new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/defla
f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),e=g.deflate(f,c),1!==e&&e!==s)return this.onEnd(e),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==c&&2!==c)||("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!==e);return 4===c?(e=g.deflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===s):2!==c||(this.onEnd(s),f.avail_out=0,!0)};b.prototype.onData=
function(b){this.chunks.push(b)};b.prototype.onEnd=function(b){b===s&&("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=b;d.deflate=e;d.deflateRaw=function(b,d){return d=d||{},d.raw=!0,e(b,d)};d.gzip=function(b,d){return d=d||{},d.gzip=!0,e(b,d)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(c,f,d){function b(d){if(!(this instanceof
b))return new b(d);var e=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},d||{});e.raw&&0<=e.windowBits&&16>e.windowBits&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15));!(0<=e.windowBits&&16>e.windowBits)||d&&d.windowBits||(e.windowBits+=32);15<e.windowBits&&48>e.windowBits&&0===(15&e.windowBits)&&(e.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;d=g.inflateInit2(this.strm,e.windowBits);if(d!==m.Z_OK)throw Error(n[d]);
this.header=new s;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),s=c("./zlib/gzheader"),t=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,s,B=this.strm,C=this.options.chunkSize,E=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
"string"==typeof b?B.input=l.binstring2buf(b):"[object ArrayBuffer]"===t.call(b)?B.input=new Uint8Array(b):B.input=b;B.next_in=0;B.avail_in=B.input.length;do{if(0===B.avail_out&&(B.output=new k.Buf8(C),B.next_out=0,B.avail_out=C),e=g.inflate(B,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&E&&(s="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===t.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,s)),e===m.Z_BUF_ERROR&&!0===G&&(e=m.Z_OK,G=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
this.header=new s;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),s=c("./zlib/gzheader"),t=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,s,B=this.strm,C=this.options.chunkSize,F=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
"string"==typeof b?B.input=l.binstring2buf(b):"[object ArrayBuffer]"===t.call(b)?B.input=new Uint8Array(b):B.input=b;B.next_in=0;B.avail_in=B.input.length;do{if(0===B.avail_out&&(B.output=new k.Buf8(C),B.next_out=0,B.avail_out=C),e=g.inflate(B,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&F&&(s="string"==typeof F?l.string2buf(F):"[object ArrayBuffer]"===t.call(F)?new Uint8Array(F):F,e=g.inflateSetDictionary(this.strm,s)),e===m.Z_BUF_ERROR&&!0===G&&(e=m.Z_OK,G=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
this.ended=!0,!1;B.next_out&&(0!==B.avail_out&&e!==m.Z_STREAM_END&&(0!==B.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(B.output,B.next_out),n=B.next_out-f,p=l.buf2string(B.output,f),B.next_out=n,B.avail_out=C-n,n&&k.arraySet(B.output,B.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(B.output,B.next_out))));0===B.avail_in&&0===B.avail_out&&(G=!0)}while((0<B.avail_in||0===B.avail_out)&&e!==m.Z_STREAM_END);return e===m.Z_STREAM_END&&(c=m.Z_FINISH),
c===m.Z_FINISH?(e=g.inflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===m.Z_OK):c!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),B.avail_out=0,!0)};b.prototype.onData=function(b){this.chunks.push(b)};b.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=b;d.inflate=e;d.inflateRaw=function(b,d){return d=d||{},d.raw=!0,e(b,d)};d.ungzip=e},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(c,f,d){c="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var e=d.shift();if(e){if("object"!=typeof e)throw new TypeError(e+"must be non-object");for(var c in e)e.hasOwnProperty(c)&&(b[c]=e[c])}}return b};d.shrinkBuf=function(b,d){return b.length===
@ -113,9 +113,9 @@ new e.Buf8(256);for(c=0;256>c;c++)n[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,l=e||d.length,m=Array(2*l);for(c=f=0;c<l;)if(g=d[c++],128>g)m[f++]=g;else if(k=n[g],4<k)m[f++]=65533,c+=k-1;else{for(g&=
2===k?31:3===k?15:7;1<k&&c<l;)g=g<<6|63&d[c++],k--;1<k?m[f++]=65533:65536>g?m[f++]=g:(g-=65536,m[f++]=55296|g>>10&1023,m[f++]=56320|1023&g)}return b(m,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+n[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var l=65535&b|0;b=b>>>16&65535|0;for(var m=0;0!==c;){m=2E3<c?2E3:c;c-=m;do l=l+d[f++]|0,b=b+l|0;while(--m);l%=65521;b%=65521}return l|
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=E[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&&(y.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){D._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-X?b.strstart-(b.w_size-X):0,n=b.window,p=b.w_mask,q=b.prev,t=b.strstart+R,s=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]===s&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;e++;do;while(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;s=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>=
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=F[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&&(y.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){D._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-X?b.strstart-(b.w_size-X):0,n=b.window,p=b.w_mask,q=b.prev,s=b.strstart+R,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;e++;do;while(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<s);if(c=R-(s-g),g=s-R,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-X)){y.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,y.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=B(d.adler,c,l,k):2===d.state.wrap&&(d.adler=C(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),
b.lookahead+=e,b.lookahead+b.insert>=J){f=b.strstart-b.insert;b.ins_h=b.window[f];for(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<X&&0!==b.strm.avail_in)}function s(b,d){for(var e,c;;){if(b.lookahead<X){if(p(b),b.lookahead<X&&d===G)return U;if(0===b.lookahead)break}if(e=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+J-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-X&&(b.match_length=n(b,e)),b.match_length>=J)if(c=D._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,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
@ -126,60 +126,60 @@ b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_o
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=Q;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 y.Buf16(2*Z);this.dyn_dtree=new y.Buf16(2*(2*O+1));this.bl_tree=new y.Buf16(2*(2*M+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 y.Buf16(N+1);this.heap=new y.Buf16(2*S+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new y.Buf16(2*S+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=V,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:da,d.adler=2===e.wrap?0:1,e.last_flush=G,D._tr_init(e),H):b(d,K)}function v(b){var d=x(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(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 d}function z(d,e,c,f,g,k){if(!d)return K;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>F||c!==Q||8>f||15<f||0>e||9<e||0>k||k>W)return b(d,K);8===f&&(f=9);var m=new u;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+J-1)/J),m.window=new y.Buf8(2*
m.w_size),m.head=new y.Buf16(m.hash_size),m.prev=new y.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new y.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,v(d)}var A,y=c("../utils/common"),D=c("./trees"),B=c("./adler32"),C=c("./crc32"),E=c("./messages"),G=0,I=4,H=0,K=-2,L=-1,P=1,W=4,V=2,Q=8,F=9,S=286,O=30,M=19,Z=2*S+1,N=15,J=3,R=258,X=R+J+1,ea=42,da=113,U=1,aa=2,ba=3,Y=4;A=[new q(0,0,0,0,function(b,
0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=J-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return K;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>E||c!==Q||8>f||15<f||0>e||9<e||0>k||k>W)return b(d,K);8===f&&(f=9);var m=new u;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+J-1)/J),m.window=new y.Buf8(2*
m.w_size),m.head=new y.Buf16(m.hash_size),m.prev=new y.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new y.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,v(d)}var A,y=c("../utils/common"),D=c("./trees"),B=c("./adler32"),C=c("./crc32"),F=c("./messages"),G=0,I=4,H=0,K=-2,L=-1,P=1,W=4,V=2,Q=8,E=9,S=286,O=30,M=19,Z=2*S+1,N=15,J=3,R=258,X=R+J+1,ea=42,da=113,U=1,aa=2,ba=3,Y=4;A=[new q(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===G)return U;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-X&&(k(b,!1),0===b.strm.avail_out))return U}return b.insert=0,d===I?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),U)}),new q(4,
4,8,4,s),new q(4,5,16,8,s),new q(4,6,32,32,s),new q(4,4,16,16,t),new q(8,16,32,32,t),new q(8,16,128,128,t),new q(8,32,128,256,t),new q(32,128,258,1024,t),new q(32,258,258,4096,t)];d.deflateInit=function(b,d){return z(b,d,Q,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=x;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?K:(b.state.gzhead=d,H):K};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5<c||0>c)return d?b(d,K):K;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||
4,8,4,s),new q(4,5,16,8,s),new q(4,6,32,32,s),new q(4,4,16,16,t),new q(8,16,32,32,t),new q(8,16,128,128,t),new q(8,32,128,256,t),new q(32,128,258,1024,t),new q(32,258,258,4096,t)];d.deflateInit=function(b,d){return z(b,d,Q,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=x;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?K:(b.state.gzhead=d,H):K};d.deflate=function(d,c){var f,n,q,s;if(!d||!d.state||5<c||0>c)return d?b(d,K):K;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||
666===n.status&&c!==I)return b(d,0===d.avail_out?-5:K);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=C(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=da)):(q=Q+(n.w_bits-8<<4)<<8,t=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,q|=t<<6,0!==n.strstart&&(q|=32),n.status=da,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&
l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(d.adler=C(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=da)):(q=Q+(n.w_bits-8<<4)<<8,s=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,q|=s<<6,0!==n.strstart&&(q|=32),n.status=da,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=C(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=C(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=C(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=C(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=C(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=C(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=da)):n.status=da),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=
-1,H}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==I)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!==G&&666!==n.status){var s;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===G){s=U;break a}break}if(n.match_length=0,u=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){s=U;break a}}s=(n.insert=0,c===I?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&
(k(n,!1),0===n.strm.avail_out)?U:aa)}else if(3===n.strategy)a:{var x,v;for(u=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===G){s=U;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=J&&0<n.strstart&&(v=n.strstart-1,x=u[v],x===u[++v]&&x===u[++v]&&x===u[++v])){f=n.strstart+R;do;while(x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&v<f);n.match_length=R-(f-v);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
J?(s=D._tr_tally(n,1,n.match_length-J),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(s=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),s&&(k(n,!1),0===n.strm.avail_out)){s=U;break a}}s=(n.insert=0,c===I?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?U:aa)}else s=A[n.level].func(n,c);if(s!==ba&&s!==Y||(n.status=666),s===U||s===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(s===aa&&(1===c?D._tr_align(n):5!==c&&(D._tr_stored_block(n,
(d.adler=C(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>q&&(d.adler=C(d.adler,n.pending_buf,n.pending-q,q));0===s&&(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=C(d.adler,n.pending_buf,n.pending-q,q)),g(d),
q=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>q&&(d.adler=C(d.adler,n.pending_buf,n.pending-q,q));0===s&&(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=da)):n.status=da),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=
-1,H}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==I)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!==G&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===G){t=U;break a}break}if(n.match_length=0,u=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=U;break a}}t=(n.insert=0,c===I?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&
(k(n,!1),0===n.strm.avail_out)?U:aa)}else if(3===n.strategy)a:{var x,v;for(u=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===G){t=U;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=J&&0<n.strstart&&(v=n.strstart-1,x=u[v],x===u[++v]&&x===u[++v]&&x===u[++v])){f=n.strstart+R;do;while(x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&x===u[++v]&&v<f);n.match_length=R-(f-v);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
J?(t=D._tr_tally(n,1,n.match_length-J),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=U;break a}}t=(n.insert=0,c===I?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?U:aa)}else t=A[n.level].func(n,c);if(t!==ba&&t!==Y||(n.status=666),t===U||t===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(t===aa&&(1===c?D._tr_align(n):5!==c&&(D._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,H}return c!==I?H: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?H: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!==da&&666!==e?b(d,K):(d.state=null,e===da?b(d,-3):H)):K};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 K;1===k&&(b.adler=B(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 y.Buf8(c.w_size),y.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>=J;){f=c.strstart;g=c.lookahead-(J-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+J-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=J-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=J-1,c.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,c.wrap=k,H};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 c,f,l,m,n,p,s,t,q,u,x,v,z,A,y,D,B,C,E,G,I,H,K,L;c=b.state;f=b.next_in;K=b.input;l=f+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);s=c.dmax;t=c.wsize;q=c.whave;u=c.wnext;x=c.window;v=c.hold;z=c.bits;A=c.lencode;
y=c.distcode;D=(1<<c.lenbits)-1;B=(1<<c.distbits)-1;a:do{15>z&&(v+=K[f++]<<z,z+=8,v+=K[f++]<<z,z+=8);C=A[v&D];b:for(;;){if(E=C>>>24,v>>>=E,z-=E,E=C>>>16&255,0===E)L[m++]=65535&C;else{if(!(16&E)){if(0===(64&E)){C=A[(65535&C)+(v&(1<<E)-1)];continue b}if(32&E){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}G=65535&C;(E&=15)&&(z<E&&(v+=K[f++]<<z,z+=8),G+=v&(1<<E)-1,v>>>=E,z-=E);15>z&&(v+=K[f++]<<z,z+=8,v+=K[f++]<<z,z+=8);C=y[v&B];c:for(;;){if(E=C>>>24,v>>>=E,z-=E,E=C>>>16&255,
!(16&E)){if(0===(64&E)){C=y[(65535&C)+(v&(1<<E)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(I=65535&C,E&=15,z<E&&(v+=K[f++]<<z,z+=8,z<E&&(v+=K[f++]<<z,z+=8)),I+=v&(1<<E)-1,I>s){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=m-n,I>E){if(E=I-E,E>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(C=0,H=x,0===u){if(C+=t-E,E<G){G-=E;do L[m++]=x[C++];while(--E);C=m-I;H=L}}else if(u<E){if(C+=t+u-E,E-=u,E<G){G-=E;do L[m++]=x[C++];while(--E);
if(C=0,u<G){E=u;G-=E;do L[m++]=x[C++];while(--E);C=m-I;H=L}}}else if(C+=u-E,E<G){G-=E;do L[m++]=x[C++];while(--E);C=m-I;H=L}for(;2<G;)L[m++]=H[C++],L[m++]=H[C++],L[m++]=H[C++],G-=3;G&&(L[m++]=H[C++],1<G&&(L[m++]=H[C++]))}else{C=m-I;do L[m++]=L[C++],L[m++]=L[C++],L[m++]=L[C++],G-=3;while(2<G);G&&(L[m++]=L[C++],1<G&&(L[m++]=L[C++]))}break}}break}}while(f<l&&m<p);G=z>>3;f-=G;z-=G<<3;b.next_in=f;b.next_out=m;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=m<p?257+(p-m):257-(m-p);c.hold=v&(1<<z)-1;c.bits=z}},
"./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 c,f,l,m,n,p,s,t,q,u,x,v,z,A,y,D,B,C,F,G,I,H,K,L;c=b.state;f=b.next_in;K=b.input;l=f+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);s=c.dmax;t=c.wsize;q=c.whave;u=c.wnext;x=c.window;v=c.hold;z=c.bits;A=c.lencode;
y=c.distcode;D=(1<<c.lenbits)-1;B=(1<<c.distbits)-1;a:do{15>z&&(v+=K[f++]<<z,z+=8,v+=K[f++]<<z,z+=8);C=A[v&D];b:for(;;){if(F=C>>>24,v>>>=F,z-=F,F=C>>>16&255,0===F)L[m++]=65535&C;else{if(!(16&F)){if(0===(64&F)){C=A[(65535&C)+(v&(1<<F)-1)];continue b}if(32&F){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}G=65535&C;(F&=15)&&(z<F&&(v+=K[f++]<<z,z+=8),G+=v&(1<<F)-1,v>>>=F,z-=F);15>z&&(v+=K[f++]<<z,z+=8,v+=K[f++]<<z,z+=8);C=y[v&B];c:for(;;){if(F=C>>>24,v>>>=F,z-=F,F=C>>>16&255,
!(16&F)){if(0===(64&F)){C=y[(65535&C)+(v&(1<<F)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(I=65535&C,F&=15,z<F&&(v+=K[f++]<<z,z+=8,z<F&&(v+=K[f++]<<z,z+=8)),I+=v&(1<<F)-1,I>s){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=F,z-=F,F=m-n,I>F){if(F=I-F,F>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(C=0,H=x,0===u){if(C+=t-F,F<G){G-=F;do L[m++]=x[C++];while(--F);C=m-I;H=L}}else if(u<F){if(C+=t+u-F,F-=u,F<G){G-=F;do L[m++]=x[C++];while(--F);
if(C=0,u<G){F=u;G-=F;do L[m++]=x[C++];while(--F);C=m-I;H=L}}}else if(C+=u-F,F<G){G-=F;do L[m++]=x[C++];while(--F);C=m-I;H=L}for(;2<G;)L[m++]=H[C++],L[m++]=H[C++],L[m++]=H[C++],G-=3;G&&(L[m++]=H[C++],1<G&&(L[m++]=H[C++]))}else{C=m-I;do L[m++]=L[C++],L[m++]=L[C++],L[m++]=L[C++],G-=3;while(2<G);G&&(L[m++]=L[C++],1<G&&(L[m++]=L[C++]))}break}}break}}while(f<l&&m<p);G=z>>3;f-=G;z-=G<<3;b.next_in=f;b.next_out=m;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=m<p?257+(p-m):257-(m-p);c.hold=v&(1<<z)-1;c.bits=z}},
{}],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=y,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(D),d.distcode=d.distdyn=new t.Buf32(B),d.sane=1,d.back=-1,z):A}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):A}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)?A:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):A}function m(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==z&&(b.state=null),c):A}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,s,t=c("../utils/common"),q=c("./adler32"),u=c("./crc32"),x=c("./inffast"),v=c("./inftrees"),z=0,A=-2,y=1,D=852,B=592,C=!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,B,F,S,O,M,Z,N,J,R,X,ea,da,U,aa,ba,Y=0,T=new t.Buf8(4),ja=[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 A;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;B=c.hold;F=c.bits;S=m;O=D;aa=z;a:for(;;)switch(c.mode){case y:if(0===c.wrap){c.mode=13;break}for(;16>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if(2&c.wrap&&35615===B){c.check=0;T[0]=255&B;T[1]=B>>>8&255;c.check=u(c.check,T,2,0);F=B=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),
!(1&c.wrap)||(((255&B)<<8)+(B>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&B)){d.msg="unknown compression method";c.mode=30;break}if(B>>>=4,F-=4,U=(15&B)+8,0===c.wbits)c.wbits=U;else if(U>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<U;d.adler=c.check=1;c.mode=512&B?10:12;F=B=0;break;case 2:for(;16>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if(c.flags=B,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=B>>8&1);512&c.flags&&(T[0]=255&B,T[1]=B>>>8&255,c.check=u(c.check,T,2,0));F=B=0;c.mode=3;case 3:for(;32>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}c.head&&(c.head.time=B);512&c.flags&&(T[0]=255&B,T[1]=B>>>8&255,T[2]=B>>>16&255,T[3]=B>>>24&255,c.check=u(c.check,T,4,0));F=B=0;c.mode=4;case 4:for(;16>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}c.head&&(c.head.xflags=255&B,c.head.os=B>>8);512&c.flags&&(T[0]=255&B,T[1]=B>>>8&255,c.check=u(c.check,T,2,0));F=B=0;c.mode=
5;case 5:if(1024&c.flags){for(;16>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}c.length=B;c.head&&(c.head.extra_len=B);512&c.flags&&(T[0]=255&B,T[1]=B>>>8&255,c.check=u(c.check,T,2,0));F=B=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>m&&(M=m),M&&(c.head&&(U=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),t.arraySet(c.head.extra,f,k,M,U)),512&c.flags&&(c.check=u(c.check,f,M,k)),m-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode=
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,s,t=c("../utils/common"),q=c("./adler32"),u=c("./crc32"),x=c("./inffast"),v=c("./inftrees"),z=0,A=-2,y=1,D=852,B=592,C=!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,B,E,S,O,M,Z,N,J,R,X,ea,da,U,aa,ba,Y=0,T=new t.Buf8(4),ja=[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 A;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;B=c.hold;E=c.bits;S=m;O=D;aa=z;a:for(;;)switch(c.mode){case y:if(0===c.wrap){c.mode=13;break}for(;16>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if(2&c.wrap&&35615===B){c.check=0;T[0]=255&B;T[1]=B>>>8&255;c.check=u(c.check,T,2,0);E=B=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),
!(1&c.wrap)||(((255&B)<<8)+(B>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&B)){d.msg="unknown compression method";c.mode=30;break}if(B>>>=4,E-=4,U=(15&B)+8,0===c.wbits)c.wbits=U;else if(U>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<U;d.adler=c.check=1;c.mode=512&B?10:12;E=B=0;break;case 2:for(;16>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if(c.flags=B,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=B>>8&1);512&c.flags&&(T[0]=255&B,T[1]=B>>>8&255,c.check=u(c.check,T,2,0));E=B=0;c.mode=3;case 3:for(;32>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}c.head&&(c.head.time=B);512&c.flags&&(T[0]=255&B,T[1]=B>>>8&255,T[2]=B>>>16&255,T[3]=B>>>24&255,c.check=u(c.check,T,4,0));E=B=0;c.mode=4;case 4:for(;16>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}c.head&&(c.head.xflags=255&B,c.head.os=B>>8);512&c.flags&&(T[0]=255&B,T[1]=B>>>8&255,c.check=u(c.check,T,2,0));E=B=0;c.mode=
5;case 5:if(1024&c.flags){for(;16>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}c.length=B;c.head&&(c.head.extra_len=B);512&c.flags&&(T[0]=255&B,T[1]=B>>>8&255,c.check=u(c.check,T,2,0));E=B=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>m&&(M=m),M&&(c.head&&(U=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),t.arraySet(c.head.extra,f,k,M,U)),512&c.flags&&(c.check=u(c.check,f,M,k)),m-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode=
7;case 7:if(2048&c.flags){if(0===m)break a;M=0;do U=f[k+M++],c.head&&U&&65536>c.length&&(c.head.name+=String.fromCharCode(U));while(U&&M<m);if(512&c.flags&&(c.check=u(c.check,f,M,k)),m-=M,k+=M,U)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;M=0;do U=f[k+M++],c.head&&U&&65536>c.length&&(c.head.comment+=String.fromCharCode(U));while(U&&M<m);if(512&c.flags&&(c.check=u(c.check,f,M,k)),m-=M,k+=M,U)break a}else c.head&&(c.head.comment=null);c.mode=
9;case 9:if(512&c.flags){for(;16>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if(B!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}F=B=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>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}d.adler=c.check=b(B);F=B=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=B,c.bits=F,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){B>>>=
7&F;F-=7&F;c.mode=27;break}for(;3>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}switch(c.last=1&B,B>>>=1,F-=1,3&B){case 0:c.mode=14;break;case 1:N=c;if(C){p=new t.Buf32(512);s=new t.Buf32(32);for(R=0;144>R;)N.lens[R++]=8;for(;256>R;)N.lens[R++]=9;for(;280>R;)N.lens[R++]=7;for(;288>R;)N.lens[R++]=8;v(1,N.lens,0,288,p,0,N.work,{bits:9});for(R=0;32>R;)N.lens[R++]=5;v(2,N.lens,0,32,s,0,N.work,{bits:5});C=!1}N.lencode=p;N.lenbits=9;N.distcode=s;N.distbits=5;if(c.mode=20,6===e){B>>>=2;F-=2;break a}break;case 2:c.mode=
17;break;case 3:d.msg="invalid block type",c.mode=30}B>>>=2;F-=2;break;case 14:B>>>=7&F;for(F-=7&F;32>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if((65535&B)!==(B>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&B,B=0,F=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>m&&(M=m),M>D&&(M=D),0===M)break a;t.arraySet(g,f,k,M,l);m-=M;k+=M;D-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if(c.nlen=
(31&B)+257,B>>>=5,F-=5,c.ndist=(31&B)+1,B>>>=5,F-=5,c.ncode=(15&B)+4,B>>>=4,F-=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>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}c.lens[ja[c.have++]]=7&B;B>>>=3;F-=3}for(;19>c.have;)c.lens[ja[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ba={bits:c.lenbits},aa=v(0,c.lens,0,19,c.lencode,0,c.work,ba),c.lenbits=ba.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(;Y=c.lencode[B&(1<<c.lenbits)-1],J=Y>>>24,R=65535&Y,!(J<=F);){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if(16>R)B>>>=J,F-=J,c.lens[c.have++]=R;else{if(16===R){for(N=J+2;F<N;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if(B>>>=J,F-=J,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}U=c.lens[c.have-1];M=3+(3&B);B>>>=2;F-=2}else if(17===R){for(N=J+3;F<N;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}B>>>=J;F-=J;U=0;M=3+(7&B);B>>>=3;F-=
3}else{for(N=J+7;F<N;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}B>>>=J;F-=J;U=0;M=11+(127&B);B>>>=7;F-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=U}}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,ba={bits:c.lenbits},aa=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,ba),c.lenbits=ba.bits,aa){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,
ba={bits:c.distbits},aa=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ba),c.distbits=ba.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=B;c.bits=F;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;B=c.hold;F=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;Y=c.lencode[B&(1<<c.lenbits)-1],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(J<=F);){if(0===
m)break a;m--;B+=f[k++]<<F;F+=8}if(N&&0===(240&N)){X=J;ea=N;for(da=R;Y=c.lencode[da+((B&(1<<X+ea)-1)>>X)],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(X+J<=F);){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}B>>>=X;F-=X;c.back+=X}if(B>>>=J,F-=J,c.back+=J,c.length=R,0===N){c.mode=26;break}if(32&N){c.back=-1;c.mode=12;break}if(64&N){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&N;c.mode=22;case 22:if(c.extra){for(N=c.extra;F<N;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}c.length+=B&(1<<c.extra)-1;B>>>=c.extra;
F-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;Y=c.distcode[B&(1<<c.distbits)-1],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(J<=F);){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if(0===(240&N)){X=J;ea=N;for(da=R;Y=c.distcode[da+((B&(1<<X+ea)-1)>>X)],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(X+J<=F);){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}B>>>=X;F-=X;c.back+=X}if(B>>>=J,F-=J,c.back+=J,64&N){d.msg="invalid distance code";c.mode=30;break}c.offset=R;c.extra=15&N;c.mode=24;case 24:if(c.extra){for(N=c.extra;F<
N;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}c.offset+=B&(1<<c.extra)-1;B>>>=c.extra;F-=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(M=O-D,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,Z=c.wsize-M):Z=c.wnext-M;M>c.length&&(M=c.length);N=c.window}else N=g,Z=l-c.offset,M=c.length;M>D&&(M=D);D-=M;c.length-=M;do g[l++]=N[Z++];while(--M);
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>F;){if(0===m)break a;m--;B|=f[k++]<<F;F+=8}if(O-=D,d.total_out+=O,c.total+=O,O&&(d.adler=c.check=c.flags?u(c.check,g,O,l-O):q(c.check,g,O,l-O)),O=D,(c.flags?B:b(B))!==c.check){d.msg="incorrect data check";c.mode=30;break}F=B=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>F;){if(0===m)break a;m--;B+=f[k++]<<F;F+=8}if(B!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=
30;break}F=B=0}c.mode=29;case 29:aa=1;break a;case 30:aa=-3;break a;case 31:return-4;default:return A}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=B,c.bits=F,(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):(S-=d.avail_in,O-=d.avail_out,d.total_in+=S,d.total_out+=O,c.total+=O,c.wrap&&O&&(d.adler=c.check=c.flags?u(c.check,g,O,d.next_out-O):q(c.check,g,O,d.next_out-O)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?
9;case 9:if(512&c.flags){for(;16>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if(B!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}E=B=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>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}d.adler=c.check=b(B);E=B=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=B,c.bits=E,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){B>>>=
7&E;E-=7&E;c.mode=27;break}for(;3>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}switch(c.last=1&B,B>>>=1,E-=1,3&B){case 0:c.mode=14;break;case 1:N=c;if(C){p=new t.Buf32(512);s=new t.Buf32(32);for(R=0;144>R;)N.lens[R++]=8;for(;256>R;)N.lens[R++]=9;for(;280>R;)N.lens[R++]=7;for(;288>R;)N.lens[R++]=8;v(1,N.lens,0,288,p,0,N.work,{bits:9});for(R=0;32>R;)N.lens[R++]=5;v(2,N.lens,0,32,s,0,N.work,{bits:5});C=!1}N.lencode=p;N.lenbits=9;N.distcode=s;N.distbits=5;if(c.mode=20,6===e){B>>>=2;E-=2;break a}break;case 2:c.mode=
17;break;case 3:d.msg="invalid block type",c.mode=30}B>>>=2;E-=2;break;case 14:B>>>=7&E;for(E-=7&E;32>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if((65535&B)!==(B>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&B,B=0,E=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>m&&(M=m),M>D&&(M=D),0===M)break a;t.arraySet(g,f,k,M,l);m-=M;k+=M;D-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if(c.nlen=
(31&B)+257,B>>>=5,E-=5,c.ndist=(31&B)+1,B>>>=5,E-=5,c.ncode=(15&B)+4,B>>>=4,E-=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>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}c.lens[ja[c.have++]]=7&B;B>>>=3;E-=3}for(;19>c.have;)c.lens[ja[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ba={bits:c.lenbits},aa=v(0,c.lens,0,19,c.lencode,0,c.work,ba),c.lenbits=ba.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(;Y=c.lencode[B&(1<<c.lenbits)-1],J=Y>>>24,R=65535&Y,!(J<=E);){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if(16>R)B>>>=J,E-=J,c.lens[c.have++]=R;else{if(16===R){for(N=J+2;E<N;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if(B>>>=J,E-=J,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}U=c.lens[c.have-1];M=3+(3&B);B>>>=2;E-=2}else if(17===R){for(N=J+3;E<N;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}B>>>=J;E-=J;U=0;M=3+(7&B);B>>>=3;E-=
3}else{for(N=J+7;E<N;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}B>>>=J;E-=J;U=0;M=11+(127&B);B>>>=7;E-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=U}}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,ba={bits:c.lenbits},aa=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,ba),c.lenbits=ba.bits,aa){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,
ba={bits:c.distbits},aa=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ba),c.distbits=ba.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=B;c.bits=E;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;B=c.hold;E=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;Y=c.lencode[B&(1<<c.lenbits)-1],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(J<=E);){if(0===
m)break a;m--;B+=f[k++]<<E;E+=8}if(N&&0===(240&N)){X=J;ea=N;for(da=R;Y=c.lencode[da+((B&(1<<X+ea)-1)>>X)],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(X+J<=E);){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}B>>>=X;E-=X;c.back+=X}if(B>>>=J,E-=J,c.back+=J,c.length=R,0===N){c.mode=26;break}if(32&N){c.back=-1;c.mode=12;break}if(64&N){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&N;c.mode=22;case 22:if(c.extra){for(N=c.extra;E<N;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}c.length+=B&(1<<c.extra)-1;B>>>=c.extra;
E-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;Y=c.distcode[B&(1<<c.distbits)-1],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(J<=E);){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if(0===(240&N)){X=J;ea=N;for(da=R;Y=c.distcode[da+((B&(1<<X+ea)-1)>>X)],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(X+J<=E);){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}B>>>=X;E-=X;c.back+=X}if(B>>>=J,E-=J,c.back+=J,64&N){d.msg="invalid distance code";c.mode=30;break}c.offset=R;c.extra=15&N;c.mode=24;case 24:if(c.extra){for(N=c.extra;E<
N;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}c.offset+=B&(1<<c.extra)-1;B>>>=c.extra;E-=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(M=O-D,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,Z=c.wsize-M):Z=c.wnext-M;M>c.length&&(M=c.length);N=c.window}else N=g,Z=l-c.offset,M=c.length;M>D&&(M=D);D-=M;c.length-=M;do g[l++]=N[Z++];while(--M);
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>E;){if(0===m)break a;m--;B|=f[k++]<<E;E+=8}if(O-=D,d.total_out+=O,c.total+=O,O&&(d.adler=c.check=c.flags?u(c.check,g,O,l-O):q(c.check,g,O,l-O)),O=D,(c.flags?B:b(B))!==c.check){d.msg="incorrect data check";c.mode=30;break}E=B=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>E;){if(0===m)break a;m--;B+=f[k++]<<E;E+=8}if(B!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=
30;break}E=B=0}c.mode=29;case 29:aa=1;break a;case 30:aa=-3;break a;case 31:return-4;default:return A}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=B,c.bits=E,(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):(S-=d.avail_in,O-=d.avail_out,d.total_in+=S,d.total_out+=O,c.total+=O,c.wrap&&O&&(d.adler=c.check=c.flags?u(c.check,g,O,d.next_out-O):q(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===S&&0===O||4===e)&&aa===z&&(aa=-5),aa)};d.inflateEnd=function(b){if(!b||!b.state)return A;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?A:(e.head=d,d.done=!1,z)):A};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?A:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=
1,z)):A};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,s,t,q,u,x){var v,z,A,y,D,B,C,E;y=x.bits;for(var G=0,I=0,H=0,K=0,L=0,P=0,W=0,V=0,Q=0,F=null,S=0,O=new b.Buf16(16),P=new b.Buf16(16),M=null,Z=0,G=0;15>=G;G++)O[G]=0;for(I=0;I<s;I++)O[c[f+I]]++;L=y;for(K=15;1<=K&&0===O[K];K--);if(L>K&&(L=K),0===K)return t[q++]=20971520,t[q++]=20971520,x.bits=1,0;for(H=1;H<K&&0===O[H];H++);L<H&&(L=H);for(G=v=1;15>=G;G++)if(v<<=1,v-=O[G],0>v)return-1;
if(0<v&&(0===d||1!==K))return-1;P[1]=0;for(G=1;15>G;G++)P[G+1]=P[G]+O[G];for(I=0;I<s;I++)0!==c[f+I]&&(u[P[c[f+I]]++]=I);if(0===d?(F=M=u,D=19):1===d?(F=e,S-=257,M=g,Z-=257,D=256):(F=k,M=l,D=-1),Q=0,I=0,G=H,y=q,P=L,W=0,A=-1,V=1<<L,s=V-1,1===d&&852<V||2===d&&592<V)return 1;for(var N=0;;){N++;B=G-W;u[I]<D?(C=0,E=u[I]):u[I]>D?(C=M[Z+u[I]],E=F[S+u[I]]):(C=96,E=0);v=1<<G-W;H=z=1<<P;do z-=v,t[y+(Q>>W)+z]=B<<24|C<<16|E|0;while(0!==z);for(v=1<<G-1;Q&v;)v>>=1;if(0!==v?(Q&=v-1,Q+=v):Q=0,I++,0===--O[G]){if(G===
[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,s,t,q,u,x){var v,z,A,y,D,B,C,F;y=x.bits;for(var G=0,I=0,H=0,K=0,L=0,P=0,W=0,V=0,Q=0,E=null,S=0,O=new b.Buf16(16),P=new b.Buf16(16),M=null,Z=0,G=0;15>=G;G++)O[G]=0;for(I=0;I<s;I++)O[c[f+I]]++;L=y;for(K=15;1<=K&&0===O[K];K--);if(L>K&&(L=K),0===K)return t[q++]=20971520,t[q++]=20971520,x.bits=1,0;for(H=1;H<K&&0===O[H];H++);L<H&&(L=H);for(G=v=1;15>=G;G++)if(v<<=1,v-=O[G],0>v)return-1;
if(0<v&&(0===d||1!==K))return-1;P[1]=0;for(G=1;15>G;G++)P[G+1]=P[G]+O[G];for(I=0;I<s;I++)0!==c[f+I]&&(u[P[c[f+I]]++]=I);if(0===d?(E=M=u,D=19):1===d?(E=e,S-=257,M=g,Z-=257,D=256):(E=k,M=l,D=-1),Q=0,I=0,G=H,y=q,P=L,W=0,A=-1,V=1<<L,s=V-1,1===d&&852<V||2===d&&592<V)return 1;for(var N=0;;){N++;B=G-W;u[I]<D?(C=0,F=u[I]):u[I]>D?(C=M[Z+u[I]],F=E[S+u[I]]):(C=96,F=0);v=1<<G-W;H=z=1<<P;do z-=v,t[y+(Q>>W)+z]=B<<24|C<<16|F|0;while(0!==z);for(v=1<<G-1;Q&v;)v>>=1;if(0!==v?(Q&=v-1,Q+=v):Q=0,I++,0===--O[G]){if(G===
K)break;G=c[f+u[I]]}if(G>L&&(Q&s)!==A){0===W&&(W=L);y+=H;P=G-W;for(v=1<<P;P+W<K&&(v-=O[P+W],!(0>=v));)P++,v<<=1;if(V+=1<<P,1===d&&852<V||2===d&&592<V)return 1;A=Q&s;t[A]=L<<24|P<<16|y-q|0}}return 0!==Q&&(t[y+Q]=G-W<<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>V-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>V-b.bi_valid,b.bi_valid+=e-V):(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(W+1),g=0;for(c=1;c<=W;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 s(b){var d;for(d=0;d<H;d++)b.dyn_ltree[2*d]=0;for(d=0;d<K;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*Q]=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 q(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 u(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(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=da[f],m(b,g+I+1,d),k=M[g],0!==k&&(f-=U[g],l(b,f,
k)),c--,g=256>c?ea[c]:ea[256+(c>>>7)],m(b,g,e),k=Z[g],0!==k&&(c-=aa[g],l(b,c,k)));while(n<b.last_lit)}m(b,Q,d)}function v(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=P;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--)u(b,g,e);f=l;
do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(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++,u(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,s=d.stat_desc.has_stree,x=d.stat_desc.extra_bits,v=d.stat_desc.extra_base,z=d.stat_desc.max_length,y=0;for(c=0;c<=W;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+
1]=0;for(e=b.heap_max+1;e<P;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>z&&(c=z,y++),k[2*f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=v&&(n=x[f-v]),q=k[2*f],b.opt_len+=q*(c+n),s&&(b.static_len+=q*(t[2*f+1]+n)));if(0!==y){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]--;y-=2}while(0<y);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 z(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*F]++):10>=l?b.bl_tree[2*S]++: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 A(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,F,b.bl_tree),l(b,n-3,2)):10>=n?
(m(b,S,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 y(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return C;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;d<I;d++)if(0!==b.dyn_ltree[2*d])return E;return C}function D(b,d,e,c){l(b,(G<<1)+(c?1:0),3);t(b);k(b,e);k(b,~e);B.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var B=c("../utils/common"),C=0,E=1,
G=0,I=256,H=I+1+29,K=30,L=19,P=2*H+1,W=15,V=16,Q=256,F=16,S=17,O=18,M=[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],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(H+2));b(R);var X=Array(2*K);b(X);var ea=Array(512);b(ea);var da=Array(256);b(da);var U=Array(29);b(U);var aa=Array(K);b(aa);var ba,Y,T,ja=!1;d._tr_init=function(b){if(!ja){var d,c,f,k=Array(W+1);
do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(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++,u(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,s=d.stat_desc.static_tree,t=d.stat_desc.has_stree,x=d.stat_desc.extra_bits,v=d.stat_desc.extra_base,z=d.stat_desc.max_length,y=0;for(c=0;c<=W;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+
1]=0;for(e=b.heap_max+1;e<P;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>z&&(c=z,y++),k[2*f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=v&&(n=x[f-v]),q=k[2*f],b.opt_len+=q*(c+n),t&&(b.static_len+=q*(s[2*f+1]+n)));if(0!==y){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]--;y-=2}while(0<y);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 z(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*E]++):10>=l?b.bl_tree[2*S]++: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 A(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,E,b.bl_tree),l(b,n-3,2)):10>=n?
(m(b,S,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 y(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return C;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return F;for(d=32;d<I;d++)if(0!==b.dyn_ltree[2*d])return F;return C}function D(b,d,e,c){l(b,(G<<1)+(c?1:0),3);t(b);k(b,e);k(b,~e);B.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var B=c("../utils/common"),C=0,F=1,
G=0,I=256,H=I+1+29,K=30,L=19,P=2*H+1,W=15,V=16,Q=256,E=16,S=17,O=18,M=[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],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(H+2));b(R);var X=Array(2*K);b(X);var ea=Array(512);b(ea);var da=Array(256);b(da);var U=Array(29);b(U);var aa=Array(K);b(aa);var ba,Y,T,ja=!1;d._tr_init=function(b){if(!ja){var d,c,f,k=Array(W+1);
for(f=c=0;28>f;f++){U[f]=c;for(d=0;d<1<<M[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){aa[f]=c;for(d=0;d<1<<Z[f];d++)ea[c++]=f}for(c>>=7;f<K;f++){aa[f]=c<<7;for(d=0;d<1<<Z[f]-7;d++)ea[256+c++]=f}for(d=0;d<=W;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,H+1,k);for(d=0;d<K;d++)X[2*d+1]=5,X[2*d]=n(d,5);ba=new e(R,M,I+1,H,W);Y=new e(X,Z,0,K,W);T=new e([],N,0,L,7);ja=!0}b.l_desc=new g(b.dyn_ltree,
ba);b.d_desc=new g(b.dyn_dtree,Y);b.bl_desc=new g(b.bl_tree,T);b.bi_buf=0;b.bi_valid=0;s(b)};d._tr_stored_block=D;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=y(b));v(b,b.l_desc);v(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*J[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)D(b,d,e,
c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),x(b,R,X);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*J[f]+1],3);A(b,b.dyn_ltree,d-1);A(b,b.dyn_dtree,e-1);x(b,b.dyn_ltree,b.dyn_dtree)}s(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++,
@ -489,7 +489,7 @@ mxXmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,m,n,p,s){if(this.textEna
m);null!=n&&t.setAttribute("clip",n?"1":"0");null!=p&&t.setAttribute("rotation",p);null!=s&&t.setAttribute("dir",s);this.root.appendChild(t)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
function mxSvgCanvas2D(a,c){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=c?c:!1;var f=null;if(a.ownerDocument!=document)for(f=a;null!=f&&"svg"!=f.nodeName;)f=f.parentNode;null!=f&&(0<f.getElementsByTagName("defs").length&&(this.defs=f.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=f.firstChild?f.insertBefore(this.defs,f.firstChild):f.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(c){mxSvgCanvas2D.prototype.useDomParser=!1}})();mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.cacheOffsetSize=!0;mxSvgCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,c=a.lastIndexOf("#");0<c&&(a=a.substring(0,c));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};
mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
mxSvgCanvas2D.prototype.createElement=function(a,c){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(c||mxConstants.NS_SVG,a);var f=this.root.ownerDocument.createElement(a);null!=c&&f.setAttribute("xmlns",c);return f};
@ -513,9 +513,9 @@ mxSvgCanvas2D.prototype.setLink=function(a){if(null==a)this.root=this.originalRo
mxSvgCanvas2D.prototype.rotate=function(a,c,f,d,b){if(0!=a||c||f){var e=this.state;d+=e.dx;b+=e.dy;d*=e.scale;b*=e.scale;e.transform=e.transform||"";if(c&&f)a+=180;else if(c!=f){var g=c?d:0,k=c?-1:1,l=f?b:0,m=f?-1:1;e.transform+="translate("+this.format(g)+","+this.format(l)+")scale("+this.format(k)+","+this.format(m)+")translate("+this.format(-g)+","+this.format(-l)+")"}if(c?!f:f)a*=-1;0!=a&&(e.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(b)+")");e.rotation+=a;e.rotationCx=
d;e.rotationCy=b}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,c,f,d){var b=this.state,e=this.createElement("rect");e.setAttribute("x",this.format((a+b.dx)*b.scale));e.setAttribute("y",this.format((c+b.dy)*b.scale));e.setAttribute("width",this.format(f*b.scale));e.setAttribute("height",this.format(d*b.scale));this.node=e};
mxSvgCanvas2D.prototype.roundrect=function(a,c,f,d,b,e){this.rect(a,c,f,d);0<b&&this.node.setAttribute("rx",this.format(b*this.state.scale));0<e&&this.node.setAttribute("ry",this.format(e*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,c,f,d){var b=this.state,e=this.createElement("ellipse");e.setAttribute("cx",Math.round((a+f/2+b.dx)*b.scale));e.setAttribute("cy",Math.round((c+d/2+b.dy)*b.scale));e.setAttribute("rx",f/2*b.scale);e.setAttribute("ry",d/2*b.scale);this.node=e};
mxSvgCanvas2D.prototype.image=function(a,c,f,d,b,e,g,k){b=this.converter.convert(b);e=null!=e?e:!0;g=null!=g?g:!1;k=null!=k?k:!1;var l=this.state;a+=l.dx;c+=l.dy;var m=this.createElement("image");m.setAttribute("x",this.format(a*l.scale));m.setAttribute("y",this.format(c*l.scale));m.setAttribute("width",this.format(f*l.scale));m.setAttribute("height",this.format(d*l.scale));null==m.setAttributeNS?m.setAttribute("xlink:href",b):m.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",b);e||m.setAttribute("preserveAspectRatio",
"none");(1>l.alpha||1>l.fillAlpha)&&m.setAttribute("opacity",l.alpha*l.fillAlpha);b=this.state.transform||"";if(g||k){var n=e=1,p=0,s=0;g&&(e=-1,p=-f-2*a);k&&(n=-1,s=-d-2*c);b+="scale("+e+","+n+")translate("+p*l.scale+","+s*l.scale+")"}0<b.length&&m.setAttribute("transform",b);this.pointerEvents||m.setAttribute("pointer-events","none");this.root.appendChild(m);this.blockImagePointerEvents&&(m.setAttribute("style","pointer-events:none"),m=this.createElement("rect"),m.setAttribute("visibility","hidden"),
m.setAttribute("pointer-events","fill"),m.setAttribute("x",this.format(a*l.scale)),m.setAttribute("y",this.format(c*l.scale)),m.setAttribute("width",this.format(f*l.scale)),m.setAttribute("height",this.format(d*l.scale)),this.root.appendChild(m))};
mxSvgCanvas2D.prototype.image=function(a,c,f,d,b,e,g,k){b=this.converter.convert(b);e=null!=e?e:!0;g=null!=g?g:!1;k=null!=k?k:!1;var l=this.state;a+=l.dx;c+=l.dy;var m=this.createElement("image");m.setAttribute("x",this.format(a*l.scale)+this.imageOffset);m.setAttribute("y",this.format(c*l.scale)+this.imageOffset);m.setAttribute("width",this.format(f*l.scale));m.setAttribute("height",this.format(d*l.scale));null==m.setAttributeNS?m.setAttribute("xlink:href",b):m.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",b);e||m.setAttribute("preserveAspectRatio","none");(1>l.alpha||1>l.fillAlpha)&&m.setAttribute("opacity",l.alpha*l.fillAlpha);b=this.state.transform||"";if(g||k){var n=e=1,p=0,s=0;g&&(e=-1,p=-f-2*a);k&&(n=-1,s=-d-2*c);b+="scale("+e+","+n+")translate("+p*l.scale+","+s*l.scale+")"}0<b.length&&m.setAttribute("transform",b);this.pointerEvents||m.setAttribute("pointer-events","none");this.root.appendChild(m);this.blockImagePointerEvents&&(m.setAttribute("style","pointer-events:none"),m=this.createElement("rect"),
m.setAttribute("visibility","hidden"),m.setAttribute("pointer-events","fill"),m.setAttribute("x",this.format(a*l.scale)),m.setAttribute("y",this.format(c*l.scale)),m.setAttribute("width",this.format(f*l.scale)),m.setAttribute("height",this.format(d*l.scale)),this.root.appendChild(m))};
mxSvgCanvas2D.prototype.convertHtml=function(a){if(this.useDomParser){var c=(new DOMParser).parseFromString(a,"text/html");null!=c&&(a=(new XMLSerializer).serializeToString(c.body),"\x3cbody"==a.substring(0,5)&&(a=a.substring(a.indexOf("\x3e",5)+1)),"\x3c/body\x3e"==a.substring(a.length-7,a.length)&&(a=a.substring(0,a.length-7)))}else{if(null!=document.implementation&&null!=document.implementation.createDocument){var c=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),
f=c.createElement("body");c.documentElement.appendChild(f);var d=document.createElement("div");d.innerHTML=a;for(a=d.firstChild;null!=a;)d=a.nextSibling,f.appendChild(c.adoptNode(a)),a=d;return f.innerHTML}c=document.createElement("textarea");c.innerHTML=a.replace(/&amp;/g,"\x26amp;amp;").replace(/&#60;/g,"\x26amp;lt;").replace(/&#62;/g,"\x26amp;gt;").replace(/&lt;/g,"\x26amp;lt;").replace(/&gt;/g,"\x26amp;gt;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;");a=c.value.replace(/&/g,"\x26amp;").replace(/&amp;lt;/g,
"\x26lt;").replace(/&amp;gt;/g,"\x26gt;").replace(/&amp;amp;/g,"\x26amp;").replace(/<br>/g,"\x3cbr /\x3e").replace(/<hr>/g,"\x3chr /\x3e").replace(/(<img[^>]+)>/gm,"$1 /\x3e")}return a};
@ -664,7 +664,7 @@ function mxArrowConnector(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.f
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(),s=c[c.length-1],t=1;t<c.length-1&&c[t].x==
c[0].x&&c[t].y==c[0].y;)t++;var q=c[t].x-c[0].x,t=c[t].y-c[0].y,u=Math.sqrt(q*q+t*t);if(0!=u){var x=q/u,v,z=x,A=t/u,y,D=A,u=e*A,B=-e*x,C=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=x;t=A;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,x,A,n,d,e,m,!0);else{v=c[0].x+u/2+m*x;y=c[0].y+B/2+m*A;var E=c[0].x-u/2+m*x,G=c[0].y-B/2+m*A;g?(a.moveTo(v,y),C.push(function(){a.lineTo(E,G)})):(a.moveTo(E,G),a.lineTo(v,y))}for(var I=y=v=0,u=0;u<c.length-2;u++)if(B=mxUtils.relativeCcw(c[u].x,
c[0].x&&c[t].y==c[0].y;)t++;var q=c[t].x-c[0].x,t=c[t].y-c[0].y,u=Math.sqrt(q*q+t*t);if(0!=u){var x=q/u,v,z=x,A=t/u,y,D=A,u=e*A,B=-e*x,C=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=x;t=A;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,x,A,n,d,e,m,!0);else{v=c[0].x+u/2+m*x;y=c[0].y+B/2+m*A;var F=c[0].x-u/2+m*x,G=c[0].y-B/2+m*A;g?(a.moveTo(v,y),C.push(function(){a.lineTo(F,G)})):(a.moveTo(F,G),a.lineTo(v,y))}for(var I=y=v=0,u=0;u<c.length-2;u++)if(B=mxUtils.relativeCcw(c[u].x,
c[u].y,c[u+1].x,c[u+1].y,c[u+2].x,c[u+2].y),v=c[u+2].x-c[u+1].x,y=c[u+2].y-c[u+1].y,I=Math.sqrt(v*v+y*y),0!=I&&(z=v/I,D=y/I,tmp=Math.max(Math.sqrt((x*z+A*D+1)/2),0.04),v=x+z,y=A+D,I=Math.sqrt(v*v+y*y),0!=I)){v/=I;y/=I;var I=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),I=0!=B&&p?Math.max(0.1,I):Math.max(tmp,0.06),H=c[u+1].x+y*e/2/I,K=c[u+1].y-v*e/2/I;y=c[u+1].x-y*e/2/I;v=c[u+1].y+v*e/2/I;0==B||!p?(a.lineTo(H,K),function(b,d){C.push(function(){a.lineTo(b,d)})}(y,v)):-1==B?(B=y+D*e,I=v-z*e,
a.lineTo(y+A*e,v-x*e),a.quadTo(H,K,B,I),function(b,d){C.push(function(){a.lineTo(b,d)})}(y,v)):(a.lineTo(H,K),function(b,d){var c=H-A*e,f=K+x*e,g=H-D*e,k=K+z*e;C.push(function(){a.quadTo(b,d,c,f)});C.push(function(){a.lineTo(g,k)})}(y,v));x=z;A=D}u=e*D;B=-e*z;if(l&&!g)this.paintMarker(a,s.x,s.y,-x,-A,f,b,e,m,!1);else{a.lineTo(s.x-m*z+u/2,s.y-m*D+B/2);var L=s.x-m*z-u/2,P=s.y-m*D-B/2;g?(a.moveTo(L,P),C.splice(0,0,function(){a.moveTo(L,P)})):a.lineTo(L,P)}for(u=C.length-1;0<=u;u--)C[u]();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,q,t,n,d,e,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,s.x,s.y,-x,-A,f,b,e,m,!0),a.stroke(),a.end()))}};
@ -1029,7 +1029,7 @@ g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microso
(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var s=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=n;l.height/=n;var q=Math.max(1,Math.ceil((l.width+this.x0)/s)),u=Math.max(1,Math.ceil((l.height+this.y0)/t));this.pageCount=q*u;var x=mxUtils.bind(this,function(){if(this.pageSelector&&(1<u||1<q)){var b=this.createPageSelector(u,q);g.body.appendChild(b);
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){b.style.position="absolute";var a=function(){b.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(b){a()});mxEvent.addListener(this.wnd,"resize",function(b){a()})}}}),v=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";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),g.body.appendChild(b));(f||a)&&this.addPageBreak(g)}),z=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=z)for(var A=0;A<z.length;A++)v(z[A],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),A=0;A<u;A++){var D=A*t/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<
q;a++){if(null==this.wnd)return null;var B=a*s/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,C=A*q+a+1,E=new mxRectangle(B,D,s,t),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-B,-D,this.scale,C,b,E);this.printBackgroundImage&&this.insertBackgroundImage(b,-B,-D)}),C);e.setAttribute("id","mxPage-"+C);v(e,null!=y||A<u-1||a<q-1)}}if(null!=y)for(A=0;A<y.length;A++)v(y[A],A<y.length-1);c&&!d&&(this.closeDocument(),x());this.wnd.focus()}catch(G){null!=
q;a++){if(null==this.wnd)return null;var B=a*s/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,C=A*q+a+1,F=new mxRectangle(B,D,s,t),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-B,-D,this.scale,C,b,F);this.printBackgroundImage&&this.insertBackgroundImage(b,-B,-D)}),C);e.setAttribute("id","mxPage-"+C);v(e,null!=y||A<u-1||a<q-1)}}if(null!=y)for(A=0;A<y.length;A++)v(y[A],A<y.length-1);c&&!d&&(this.closeDocument(),x());this.wnd.focus()}catch(G){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("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,c){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');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("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
@ -2051,8 +2051,8 @@ d.cellEditor.stopEditing=function(b,a){u.apply(this,arguments);s()};d.container.
mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="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("\x3d");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={};this.fireEvent(new mxEventObject("styleChanged",
"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],y="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)v.push(D[a][c]);for(a=0;a<z.length;a++)v.push(z[a]);var B=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=v.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("\x3d");if(0<=q){var t=p.substring(0,q),s=mxUtils.indexOf(n,t);0<=s&&n.splice(s,1);for(var u=0;u<D.length;u++){var x=D[u];if(0<=mxUtils.indexOf(x,t))for(var y=
0;y<x.length;y++){var A=mxUtils.indexOf(n,x[y]);0<=A&&n.splice(A,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var t=n[f],B=c[t];if(null!=B&&("shape"!=t||e))(!e||0>mxUtils.indexOf(z,t))&&d.setCellStyles(t,B,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(b,a){B(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){B(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,
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=v.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("\x3d");if(0<=q){var s=p.substring(0,q),t=mxUtils.indexOf(n,s);0<=t&&n.splice(t,1);for(var u=0;u<D.length;u++){var x=D[u];if(0<=mxUtils.indexOf(x,s))for(var y=
0;y<x.length;y++){var A=mxUtils.indexOf(n,x[y]);0<=A&&n.splice(A,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var s=n[f],B=c[s];if(null!=B&&("shape"!=s||e))(!e||0>mxUtils.indexOf(z,s))&&d.setCellStyles(s,B,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(b,a){B(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){B(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"));B(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(A,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=
mxUtils.indexOf(z,e[g]))f||0<=mxUtils.indexOf(y,e[g])?null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]:c&&0<=mxUtils.indexOf(v,e[g])&&(null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g]);else if(0<=mxUtils.indexOf(v,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(y,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"==
@ -2318,14 +2318,14 @@ Sidebar.prototype.createDragSource=function(a,c,f,d,b){function e(b,a){var d=nul
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),K=e):mxUtils.setOpacity(e,e==C?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,m=null,n=null,p=this,s=0;s<d.length&&!(null==
n&&this.editorUi.editor.graph.model.isVertex(d[s])?n=s:null==m&&this.editorUi.editor.graph.model.isEdge(d[s])&&null==this.editorUi.editor.graph.model.getTerminal(d[s],!0)&&(m=s),null!=n&&null!=m);s++);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!=v&&K==C){var k=b.isCellSelected(v.cell)?b.getSelectionCells():[v.cell],k=this.updateShapes(b.model.isEdge(v.cell)?d[0]:d[n],
k);b.setSelectionCells(k)}else null!=d&&null!=K&&null!=u&&K!=C?(k=b.model.isEdge(u.cell)||null==m?n:m,this.dropAndConnect(u.cell,d,H,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 q=t.mouseDown;t.mouseDown=function(b){!mxEvent.isPopupTrigger(b)&&!mxEvent.isMultiTouchEvent(b)&&
(l.stopEditing(),q.apply(this,arguments))};var u=null,x=null,v=null,z=!1,A=e(this.triangleUp,mxResources.get("connect")),y=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),B=e(this.triangleLeft,mxResources.get("connect")),C=e(this.refreshTarget,mxResources.get("replace")),E=null,G=e(this.roundDrop),I=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,K=null,L=t.createPreviewElement;t.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&
(l.stopEditing(),q.apply(this,arguments))};var u=null,x=null,v=null,z=!1,A=e(this.triangleUp,mxResources.get("connect")),y=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),B=e(this.triangleLeft,mxResources.get("connect")),C=e(this.refreshTarget,mxResources.get("replace")),F=null,G=e(this.roundDrop),I=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,K=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 P=t.dragEnter;t.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");P.apply(this,arguments)};var W=t.dragExit;t.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");W.apply(this,arguments)};t.dragOver=function(a,e){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=K&&this.currentGuide.hide();if(null!=
this.previewElement){var c=a.view;if(null!=v&&K==C)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=u&&null!=K){var f=a.model.isEdge(u.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(u.cell,d[f],H,d),k=!a.model.isEdge(u.cell)?a.getCellGeometry(u.cell):null,l=a.getCellGeometry(d[f]),q=a.model.getParent(u.cell),
s=c.translate.x*c.scale,x=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(q)&&(x=c.getState(q),s=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+s+"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 V=(new Date).getTime(),Q=0,F=null,S=this.editorUi.editor.graph.getCellStyle(d[0]);t.getDropTarget=mxUtils.bind(this,function(b,
a,e,c){var f=!mxEvent.isAltDown(c)&&null!=d?b.getCellAt(a,e):null;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=K=null;F!=l?(F=l,V=(new Date).getTime(),Q=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==K&&(F=l,t.getDropTarget(b,a,e,c))},this.dropTargetDelay+
(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 V=(new Date).getTime(),Q=0,E=null,S=this.editorUi.editor.graph.getCellStyle(d[0]);t.getDropTarget=mxUtils.bind(this,function(b,
a,e,c){var f=!mxEvent.isAltDown(c)&&null!=d?b.getCellAt(a,e):null;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=K=null;E!=l?(E=l,V=(new Date).getTime(),Q=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==K&&(E=l,t.getDropTarget(b,a,e,c))},this.dropTargetDelay+
10))):Q=(new Date).getTime()-V;if(2500>Q&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(S,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(S,mxConstants.STYLE_SHAPE)||1500<Q||b.model.isEdge(l.cell))&&Q>this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=n||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=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);C.style.left=Math.floor(m.x)+"px";C.style.top=Math.floor(m.y)+"px";null==E&&(b.container.appendChild(C),E=C.parentNode);g(a,e,m,C)}else null==v||!mxUtils.contains(v,a,e)||1500<Q&&!mxEvent.isShiftDown(c)?(v=null,null!=E&&(C.parentNode.removeChild(C),E=null)):null!=v&&null!=E&&(m=b.model.isEdge(v.cell)?b.view.getPoint(v):new mxPoint(v.getCenterX(),
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);C.style.left=Math.floor(m.x)+"px";C.style.top=Math.floor(m.y)+"px";null==F&&(b.container.appendChild(C),F=C.parentNode);g(a,e,m,C)}else null==v||!mxUtils.contains(v,a,e)||1500<Q&&!mxEvent.isShiftDown(c)?(v=null,null!=F&&(C.parentNode.removeChild(C),F=null)):null!=v&&null!=F&&(m=b.model.isEdge(v.cell)?b.view.getPoint(v):new mxPoint(v.getCenterX(),
v.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,C));if(z&&null!=u&&!mxEvent.isAltDown(c)&&null==K){k=mxRectangle.fromRectangle(u);if(b.model.isEdge(u.cell)){var p=u.absolutePoints;null!=G.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),G)));null!=I.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),I)))}else m=mxRectangle.fromRectangle(u),null!=u.shape&&null!=u.shape.boundingBox&&(m=mxRectangle.fromRectangle(u.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(u.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(u.getCenterX()-this.triangleUp.width/2,m.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),A)),k.add(g(a,e,new mxRectangle(m.x+m.width,u.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),y)),k.add(g(a,e,new mxRectangle(u.getCenterX()-this.triangleDown.width/
@ -2335,7 +2335,7 @@ this.roundDrop.width/2)+"px",I.style.top=Math.floor(p.y-this.roundDrop.height/2)
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)),A.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",A.style.top=Math.floor(m.y-this.triangleUp.height)+"px",y.style.left=Math.floor(m.x+m.width)+"px",y.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
2)+"px",D.style.left=A.style.left,D.style.top=Math.floor(m.y+m.height)+"px",B.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",B.style.top=y.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(A),b.container.appendChild(D)),b.container.appendChild(y),b.container.appendChild(B));null!=l&&(x=b.selectionCellsHandler.getHandler(l.cell),null!=x&&null!=x.setHandlesVisible&&x.setHandlesVisible(!1));z=!0}else{k=[G,I,A,y,D,B];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m])}!z&&
null!=x&&x.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=v&&K==C)?mxDragSource.prototype.getDropTarget.apply(this,arguments):null;k=b.getModel();if(null!=f&&(null!=K||!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=[G,I,C,A,y,D,B],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=u&&null!=x&&x.reset();K=E=v=u=x=null};return t};
arguments);for(var b=[G,I,C,A,y,D,B],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=u&&null!=x&&x.reset();K=F=v=u=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&&(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})};
@ -2371,8 +2371,8 @@ d.push(a[e])}return d};this.connectionHandler.createTargetVertex=function(b,a){v
function(){var b=this.currentState;q.apply(this,arguments);b!=this.currentState?(s=(new Date).getTime(),t=0):t=(new Date).getTime()-s};var u=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"))&&u.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(b){return x.apply(this,
arguments)||mxEvent.isShiftDown(b)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(b){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(z=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=z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var A=this.click;this.click=function(b){if(!this.isEnabled()&&!b.isConsumed()){var a=b.getCell();null!=a&&(a=this.getLinkForCell(a),null!=a&&window.open(a))}else return A.apply(this,arguments)};var y=this.getCursorForCell;this.getCursorForCell=function(b){if(this.isEnabled())return y.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 t=
mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=t&&(q=mxUtils.getBoundingBox(q,t));(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 D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:D.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,
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 s=
mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=s&&(q=mxUtils.getBoundingBox(q,s));(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 D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:D.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 B=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();B=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));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!=B?this.addSelectionCells(B):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);B=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,a){return a&&b.view.graph.isCellSelected(b.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var C=this.updateMouseEvent;this.updateMouseEvent=function(b){b=C.apply(this,arguments);this.isCellLocked(b.getCell())&&(b.state=null);return b}}};
@ -2481,7 +2481,7 @@ f[1]),2<f.length?"0"!=f[2]:!0))}}catch(g){}return e}if(null!=b.shape)if(null!=b.
this.setCellStyles(mxConstants.STYLE_ELBOW,a,[b]))}};Graph.prototype.isValidRoot=function(b){for(var a=this.model.getChildCount(b),d=0,e=0;e<a;e++){var c=this.model.getChildAt(b,e);this.model.isVertex(c)&&(c=this.getCellGeometry(c),null!=c&&!c.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 e=0;e<b.length;e++){var c=b[e];if(a.isEdge(c)){var f=a.getTerminal(c,!0),g=a.getTerminal(c,!1);a.setTerminal(c,g,!0);a.setTerminal(c,f,!1);var k=a.getGeometry(c);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(c,k);var n=this.view.getState(c),p=this.view.getState(f),q=this.view.getState(g);if(null!=n){var t=null!=p?this.getConnectionConstraint(n,p,!0):null,s=null!=q?this.getConnectionConstraint(n,q,!1):null;this.setConnectionConstraint(c,f,!0,s);this.setConnectionConstraint(c,g,!1,t)}d.push(c)}}else if(a.isVertex(c)&&(k=this.getCellGeometry(c),null!=k)){k=k.clone();k.x+=k.width/2-k.height/
var l=k.getTerminalPoint(!0),m=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(m,!0);a.setGeometry(c,k);var n=this.view.getState(c),p=this.view.getState(f),q=this.view.getState(g);if(null!=n){var s=null!=p?this.getConnectionConstraint(n,p,!0):null,t=null!=q?this.getConnectionConstraint(n,q,!1):null;this.setConnectionConstraint(c,f,!0,t);this.setConnectionConstraint(c,g,!1,s)}d.push(c)}}else if(a.isVertex(c)&&(k=this.getCellGeometry(c),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(c,k);var x=this.view.getState(c);if(null!=x){var v=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,v,[c])}d.push(c)}}}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 e=this.view.getState(b[d]);if(null!=e){var c=mxUtils.getValue(e.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),e=mxUtils.getValue(e.style,
@ -2505,42 +2505,42 @@ g.getCenterY(),e=null!=e?Math.max(e,k):k,c=null!=c?Math.min(c,k):k;d.push(g)}}if
Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.encodeCells=function(b){for(var a=this.cloneCells(b),d=0;d<a.length;d++){var e=this.view.getState(b[d]);if(null!=e){var c=this.getCellGeometry(a[d]);null!=c&&c.relative&&(c.relative=!1,c.x=e.x/e.view.scale-e.view.translate.x,c.y=e.y/e.view.scale-e.view.translate.y)}}for(var e=new mxCodec,c=new mxGraphModel,f=c.getChildAt(c.getRoot(),0),d=0;d<b.length;d++)c.add(f,a[d]);
return e.encode(c)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,a){return this.getLinkForCell(b.cell)});return b};Graph.prototype.getSvg=function(b,a,d,e,c,f,g){a=null!=a?a:1;d=null!=d?d:0;c=null!=c?c:!0;f=null!=f?f:!0;g=null!=g?g:!0;var k=f||e?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();e=
null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=b&&(null!=e.style?e.style.backgroundColor=b:e.setAttribute("style","background-color:"+b));null==m.createElementNS?(e.setAttribute("xmlns",mxConstants.NS_SVG),e.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=a/l;e.setAttribute("width",Math.ceil(k.width*b)+2*d+"px");e.setAttribute("height",Math.ceil(k.height*b)+2*
d+"px");e.setAttribute("version","1.1");var n=e;c&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),e.appendChild(n));m.appendChild(e);m=this.createSvgCanvas(n);m.foOffset=c?-0.5:0;m.textOffset=c?-0.5:0;m.translate(Math.floor((d/a-k.x)/l),Math.floor((d/a-k.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(b,a,d,e,c,f,g,k,l,m,n,q,t){var s=this.state;if(null!=this.foAltText&&(0==e||0!=s.fontSize&&
f.length<5*e/s.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(e/2));u.setAttribute("y",Math.round((c+s.fontSize)/2));u.setAttribute("fill",s.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(s.fontSize)+"px");u.setAttribute("font-family",s.fontFamily);(s.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(s.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style",
"italic");(s.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,f);return u}return p.apply(this,arguments)};d=this.backgroundImage;null!=d&&(c=l/a,a=this.view.translate,c=new mxRectangle(a.x*c,a.y*c,d.width*c,d.height*c),mxUtils.intersects(k,c)&&m.image(a.x,a.y,d.width,d.height,d.src,!0));m.scale(b);m.textEnabled=g;g=this.createSvgImageExport();var q=g.drawCellState;g.drawCellState=function(b,a){(f||b.view.graph.isCellSelected(b.cell))&&
q.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),m);return e};Graph.prototype.createSvgCanvas=function(b){return new mxSvgCanvas2D(b)};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var a=window.getSelection();a.getRangeAt&&a.rangeCount&&(b=a.getRangeAt(0).commonAncestorContainer)}else document.selection&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getParentByName=function(b,a,d){for(;null!=b&&b.nodeName!=
a;){if(b==d)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var a=null;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){var d=document.createRange();d.selectNode(b);a.removeAllRanges();a.addRange(d)}}else if((a=document.selection)&&"Control"!=a.type)b=a.createRange(),b.collapse(!0),d=a.createRange(),d.setEndPoint("StartToStart",b),d.select()};Graph.prototype.insertRow=function(b,a){for(var d=b.tBodies[0],e=0<d.rows.length?d.rows[0].cells.length:
1,d=d.insertRow(a),c=0;c<e;c++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(b,a){b.tBodies[0].deleteRow(a)};Graph.prototype.insertColumn=function(b,a){var d=b.tHead;if(null!=d)for(var e=0;e<d.rows.length;e++){var c=document.createElement("th");d.rows[e].appendChild(c);mxUtils.br(c)}d=b.tBodies[0];for(e=0;e<d.rows.length;e++)c=d.rows[e].insertCell(a),mxUtils.br(c);return d.rows[0].cells[0<=a?a:d.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,
a){if(0<=a)for(var d=b.tBodies[0].rows,e=0;e<d.length;e++)d[e].cells.length>a&&d[e].deleteCell(a)};Graph.prototype.pasteHtmlAtCaret=function(b){var a;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){a=a.getRangeAt(0);a.deleteContents();var d=document.createElement("div");d.innerHTML=b;b=document.createDocumentFragment();for(var e;e=d.firstChild;)lastNode=b.appendChild(e);a.insertNode(b)}}else(a=document.selection)&&"Control"!=a.type&&a.createRange().pasteHTML(b)};Graph.prototype.initTouch=
function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(b,a){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(a){a=b.apply(this,arguments);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,e=!1,c=this.fireMouseEvent;this.fireMouseEvent=function(b,f,g){b==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),a=this.isCellSelected(f.getCell()),d=this.isSelectionEmpty(),e=this.popupMenuHandler.isMenuShowing());c.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(b,c){this.popupMenuHandler.popupTrigger=
!this.isEditing()&&this.isEnabled()&&(null==c.getState()||!c.isSource(c.getState().control))&&(this.popupMenuHandler.popupTrigger||!e&&!mxEvent.isMouseEvent(c.getEvent())&&(d&&null==c.getCell()&&this.isSelectionEmpty()||a&&this.isCellSelected(c.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(e){}};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),e=this.graph.getCellGeometry(b);this.graph.getModel().isEdge(d)&&
null!=e&&e.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 e=d.firstChild;null!=b&&null!=
e;)a(b,e),b=b.nextSibling,e=e.nextSibling;return d}function d(b,a){if(null!=b)if(a.originalNode!=b)e(b);else{b=b.firstChild;for(a=a.firstChild;null!=b;){var c=b.nextSibling;null==a?e(b):(d(b,a),a=a.nextSibling);b=c}}}function e(b){for(var a=b.firstChild;null!=a;){var d=a.nextSibling;e(a);a=d}(1!=b.nodeType||"BR"!==b.nodeName&&null==b.firstChild)&&(3!=b.nodeType||0==mxUtils.trim(mxUtils.getTextContent(b)).length)?b.parentNode.removeChild(b):(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,
"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border")))}k.apply(this,arguments);!mxClient.IS_QUIRKS&&7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var e=a(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){d(this.textarea,e)}),0)}))};mxCellEditor.prototype.toggleViewMode=
function(){var b=this.graph.view.getState(this.editingCell),a=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),d=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(a?k.replace(/\n/g,"\x3cbr/\x3e"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var e=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),c=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,b=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=
mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(e)+"px";this.textarea.style.textDecoration=b?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=a;this.textarea.style.textAlign=c;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);!mxClient.IS_QUIRKS&&8!=document.documentMode&&(k=mxUtils.replaceTrailingNewlines(k,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));k=this.graph.sanitizeHtml(a?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"\x3cbr\x3e"):k,!0);this.textarea.className=
"mxCellEditor mxPlainTextEditor";e=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(e)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=
k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=d;this.resize()};var l=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,a){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=b){var d=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
160*d;this.bounds.height=60*d;var e=null!=b.text?b.text.margin:null;null==e&&(e=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=e.x*this.bounds.width;this.bounds.y+=e.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,"\x3cbr/\x3e"));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,"\x3cbr/\x3e").replace(/\n/g,
"\x3cbr/\x3e"):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(a){}};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),e=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(a||"")&&d==mxConstants.NONE&&e==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,e,c,f){mxEvent.isAltDown(f)&&(c=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,e=
this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/e-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/e-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=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(b,a){return!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!mxEvent.isControlDown(a.getEvent())&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(b,a){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&
null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(a.getEvent())||mxEvent.isMetaDown(a.getEvent())};var s=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),a=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(a/=2,b.x=this.sizers[0].bounds.width+a,b.y=this.sizers[0].bounds.height+a):b=s.apply(this,arguments);return b};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+"\x26deg;":(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,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,c=this.graph.view.scale,f=this.roundLength(d.x/c-e.x),e=this.roundLength(d.y/c-e.y);this.hint.innerHTML=f+", "+e;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(),d.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\x3d\x3d":
d+"px");e.setAttribute("version","1.1");var n=e;c&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),e.appendChild(n));m.appendChild(e);m=this.createSvgCanvas(n);m.foOffset=c?-0.5:0;m.textOffset=c?-0.5:0;m.imageOffset=c?-0.5:0;m.translate(Math.floor((d/a-k.x)/l),Math.floor((d/a-k.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(b,a,d,e,c,f,g,k,l,m,n,q,s){var t=this.state;if(null!=this.foAltText&&
(0==e||0!=t.fontSize&&f.length<5*e/t.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(e/2));u.setAttribute("y",Math.round((c+t.fontSize)/2));u.setAttribute("fill",t.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(t.fontSize)+"px");u.setAttribute("font-family",t.fontFamily);(t.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(t.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
u.setAttribute("font-style","italic");(t.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,f);return u}return p.apply(this,arguments)};d=this.backgroundImage;null!=d&&(c=l/a,a=this.view.translate,c=new mxRectangle(a.x*c,a.y*c,d.width*c,d.height*c),mxUtils.intersects(k,c)&&m.image(a.x,a.y,d.width,d.height,d.src,!0));m.scale(b);m.textEnabled=g;g=this.createSvgImageExport();var q=g.drawCellState;g.drawCellState=function(b,
a){(f||b.view.graph.isCellSelected(b.cell))&&q.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),m);return e};Graph.prototype.createSvgCanvas=function(b){return new mxSvgCanvas2D(b)};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var a=window.getSelection();a.getRangeAt&&a.rangeCount&&(b=a.getRangeAt(0).commonAncestorContainer)}else document.selection&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getParentByName=
function(b,a,d){for(;null!=b&&b.nodeName!=a;){if(b==d)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var a=null;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){var d=document.createRange();d.selectNode(b);a.removeAllRanges();a.addRange(d)}}else if((a=document.selection)&&"Control"!=a.type)b=a.createRange(),b.collapse(!0),d=a.createRange(),d.setEndPoint("StartToStart",b),d.select()};Graph.prototype.insertRow=function(b,a){for(var d=b.tBodies[0],
e=0<d.rows.length?d.rows[0].cells.length:1,d=d.insertRow(a),c=0;c<e;c++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(b,a){b.tBodies[0].deleteRow(a)};Graph.prototype.insertColumn=function(b,a){var d=b.tHead;if(null!=d)for(var e=0;e<d.rows.length;e++){var c=document.createElement("th");d.rows[e].appendChild(c);mxUtils.br(c)}d=b.tBodies[0];for(e=0;e<d.rows.length;e++)c=d.rows[e].insertCell(a),mxUtils.br(c);return d.rows[0].cells[0<=a?a:d.rows[0].cells.length-1]};
Graph.prototype.deleteColumn=function(b,a){if(0<=a)for(var d=b.tBodies[0].rows,e=0;e<d.length;e++)d[e].cells.length>a&&d[e].deleteCell(a)};Graph.prototype.pasteHtmlAtCaret=function(b){var a;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){a=a.getRangeAt(0);a.deleteContents();var d=document.createElement("div");d.innerHTML=b;b=document.createDocumentFragment();for(var e;e=d.firstChild;)lastNode=b.appendChild(e);a.insertNode(b)}}else(a=document.selection)&&"Control"!=a.type&&
a.createRange().pasteHTML(b)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(b,a){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(a){a=b.apply(this,arguments);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,e=!1,c=this.fireMouseEvent;this.fireMouseEvent=function(b,f,g){b==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),a=this.isCellSelected(f.getCell()),d=this.isSelectionEmpty(),e=this.popupMenuHandler.isMenuShowing());c.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(b,c){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==c.getState()||!c.isSource(c.getState().control))&&(this.popupMenuHandler.popupTrigger||!e&&!mxEvent.isMouseEvent(c.getEvent())&&(d&&null==c.getCell()&&this.isSelectionEmpty()||a&&this.isCellSelected(c.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(e){}};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),
e=this.graph.getCellGeometry(b);this.graph.getModel().isEdge(d)&&null!=e&&e.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 e=d.firstChild;null!=b&&null!=e;)a(b,e),b=b.nextSibling,e=e.nextSibling;return d}function d(b,a){if(null!=b)if(a.originalNode!=b)e(b);else{b=b.firstChild;for(a=a.firstChild;null!=b;){var c=b.nextSibling;null==a?e(b):(d(b,a),a=a.nextSibling);b=c}}}function e(b){for(var a=b.firstChild;null!=a;){var d=a.nextSibling;e(a);a=d}(1!=b.nodeType||"BR"!==b.nodeName&&null==b.firstChild)&&(3!=b.nodeType||0==mxUtils.trim(mxUtils.getTextContent(b)).length)?b.parentNode.removeChild(b):(3==
b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border")))}k.apply(this,arguments);!mxClient.IS_QUIRKS&&7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var e=a(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
function(){d(this.textarea,e)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell),a=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),d=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(a?k.replace(/\n/g,"\x3cbr/\x3e"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var e=mxUtils.getValue(b.style,
mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),c=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,b=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==
mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(e)+"px";this.textarea.style.textDecoration=b?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=a;this.textarea.style.textAlign=c;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=
k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);!mxClient.IS_QUIRKS&&8!=document.documentMode&&(k=mxUtils.replaceTrailingNewlines(k,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));k=this.graph.sanitizeHtml(a?k.replace(/\n/g,
"").replace(/&lt;br\s*.?&gt;/g,"\x3cbr\x3e"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";e=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(e)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign=
"left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=d;this.resize()};var l=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,a){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=b){var d=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);
if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*d;this.bounds.height=60*d;var e=null!=b.text?b.text.margin:null;null==e&&(e=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=e.x*this.bounds.width;this.bounds.y+=e.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,"\x3cbr/\x3e"));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,"\x3cbr/\x3e").replace(/\n/g,"\x3cbr/\x3e"):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(a){}};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),e=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(a||"")&&d==mxConstants.NONE&&e==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,e,c,f){mxEvent.isAltDown(f)&&(c=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,e=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/e-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/e-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=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(b,a){return!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!mxEvent.isControlDown(a.getEvent())&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(b,a){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&
"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(a.getEvent())||mxEvent.isMetaDown(a.getEvent())};var s=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),a=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(a/=2,b.x=this.sizers[0].bounds.width+a,b.y=this.sizers[0].bounds.height+
a):b=s.apply(this,arguments);return b};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+"\x26deg;":(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,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,c=this.graph.view.scale,f=this.roundLength(d.x/c-e.x),e=this.roundLength(d.y/
c-e.y);this.hint.innerHTML=f+", "+e;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(),
d.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\x3d\x3d":
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\x3d":
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\x3d\x3d":
@ -2565,7 +2565,7 @@ this.preferHtml&&(d-=1);return new mxRectangleShape(new mxRectangle(0,0,d,d),mxC
function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),e=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=e&&e.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 y.apply(this,arguments)};var D=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=this.graph.getModel(),d=a.getParent(b.cell),
e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.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))):D.apply(this,arguments)};var B=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),c=this.graph.getCellGeometry(this.state.cell);
(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&B.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var E=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var F=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var b=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var a=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(b,d){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,a){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var d=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(d);null!=d&&(b=!0);b&&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=
@ -2581,8 +2581,8 @@ b.height+6+this.state.view.graph.tolerance)+"px"}};var V=mxEdgeHandler.prototype
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 s(){mxActor.call(this)}function t(){mxActor.call(this)}function q(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,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function y(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}function C(){mxEllipse.call(this)}function E(){mxShape.call(this)}
function G(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function K(){mxShape.call(this)}function L(){mxShape.call(this)}function P(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxArrowConnector.call(this);this.spacing=0}function F(){mxArrowConnector.call(this);this.spacing=0}function S(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function y(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}function C(){mxEllipse.call(this)}function F(){mxShape.call(this)}
function G(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function K(){mxShape.call(this)}function L(){mxShape.call(this)}function P(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxArrowConnector.call(this);this.spacing=0}function E(){mxArrowConnector.call(this);this.spacing=0}function S(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
function Z(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function U(){mxActor.call(this)}function aa(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function T(){mxRhombus.call(this)}function ja(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}
function ga(){mxEllipse.call(this)}function ka(){mxActor.call(this)}function ha(){mxActor.call(this)}function pa(){mxActor.call(this)}function xa(b,a,d,e,c,f,g,k,l,m){g+=l;var n=e.clone();e.x-=c*(2*g+l);e.y-=f*(2*g+l);c*=g+l;f*=g+l;return function(){b.ellipse(n.x-c-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,e,c,f){a=Math.max(0,Math.min(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));
f?(b.moveTo(a,c),b.lineTo(a,a),b.lineTo(0,0),b.moveTo(a,a),b.lineTo(e,a)):(b.moveTo(0,0),b.lineTo(e-a,0),b.lineTo(e,a),b.lineTo(e,c),b.lineTo(a,c),b.lineTo(0,c-a),b.lineTo(0,0),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var ua=Math.tan(mxUtils.toRadians(30)),oa=(0.5-ua)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e,c/ua);b.translate((e-a)/2,(c-a)/2+a/4);b.moveTo(0,0.25*a);b.lineTo(0.5*a,a*oa);b.lineTo(a,0.25*a);b.lineTo(0.5*
@ -2612,11 +2612,11 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPo
arguments)};mxCellRenderer.prototype.defaultShapes.plus=z;var ya=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,e,c){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);a+=f;d+=f;e-=2*f;c-=2*f;0<e&&0<c&&(b.setShadow(!1),ya.apply(this,[b,a,d,e,c]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.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};A.prototype.paintForeground=function(b,a,d,
e,c){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;e-=2*f;c-=2*f;0<e&&0<c&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var f=0,g=null;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(e+this.strokewidth,c+this.strokewidth)*q);var q=a,t=d,q=k==mxConstants.ALIGN_CENTER?q+(e-m)/2:k==mxConstants.ALIGN_RIGHT?q+(e-m-p):q+p,t=l==mxConstants.ALIGN_MIDDLE?t+(c-n)/2:l==mxConstants.ALIGN_BOTTOM?t+(c-n-p):t+p;b.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,b,q,t,m,n);b.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,q=this.style["symbol"+f+"ArcSpacing"];null!=q&&(p+=this.getArcSize(e+this.strokewidth,c+this.strokewidth)*q);var q=a,s=d,q=k==mxConstants.ALIGN_CENTER?q+(e-m)/2:k==mxConstants.ALIGN_RIGHT?q+(e-m-p):q+p,s=l==mxConstants.ALIGN_MIDDLE?s+(c-n)/2:l==mxConstants.ALIGN_BOTTOM?s+(c-n-p):s+p;b.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,b,q,s,m,n);b.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.prototype.defaultShapes.ext=A;mxUtils.extend(y,mxCylinder);y.prototype.redrawPath=function(b,a,d,e,c,f){f?(b.moveTo(0,0),b.lineTo(e/2,c/2),b.lineTo(e,0),b.end()):(b.moveTo(0,0),b.lineTo(e,0),b.lineTo(e,c),b.lineTo(0,c),b.close())};mxCellRenderer.prototype.defaultShapes.message=y;mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.ellipse(e/4,0,e/2,c/4);b.fillAndStroke();b.begin();b.moveTo(e/2,c/4);b.lineTo(e/2,2*c/3);b.moveTo(e/2,
c/3);b.lineTo(0,c/3);b.moveTo(e/2,c/3);b.lineTo(e,c/3);b.moveTo(e/2,2*c/3);b.lineTo(0,c);b.moveTo(e/2,2*c/3);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=D;mxUtils.extend(B,mxShape);B.prototype.getLabelBounds=function(b){return new mxRectangle(b.x+b.width/6,b.y,5*b.width/6,b.height)};B.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(0,c/4);b.lineTo(0,3*c/4);b.end();b.stroke();b.begin();b.moveTo(0,c/2);b.lineTo(e/6,c/2);b.end();
b.stroke();b.ellipse(e/6,0,5*e/6,c);b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=B;mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+e/8,d+c);b.lineTo(a+7*e/8,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=C;mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(e,0);b.lineTo(0,c);b.moveTo(0,
0);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=E;mxUtils.extend(G,mxShape);G.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};G.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,0);b.end();b.stroke();b.ellipse(0,c/8,e,7*c/8);b.fillAndStroke()};G.prototype.paintForeground=function(b,a,d,e,c){b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,c/
b.stroke();b.ellipse(e/6,0,5*e/6,c);b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=B;mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+e/8,d+c);b.lineTo(a+7*e/8,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=C;mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(e,0);b.lineTo(0,c);b.moveTo(0,
0);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=F;mxUtils.extend(G,mxShape);G.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};G.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,0);b.end();b.stroke();b.ellipse(0,c/8,e,7*c/8);b.fillAndStroke()};G.prototype.paintForeground=function(b,a,d,e,c){b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,c/
4);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=G;mxUtils.extend(I,mxRectangleShape);I.prototype.size=40;I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,a)};I.prototype.paintBackground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,a,d,e,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=I&&(g=new g,g.apply(this.state),b.save(),g.paintVertexShape(b,a,d,e,f),b.restore()));f<c&&(b.setDashed(!0),b.begin(),b.moveTo(a+e/2,d+f),b.lineTo(a+e/2,d+c),b.end(),b.stroke())};I.prototype.paintForeground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
mxRectangleShape.prototype.paintForeground.call(this,b,a,d,e,Math.min(c,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=I;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(b.x,b.y,
@ -2627,8 +2627,8 @@ d.y<b.getCenterY()&&(e+=1,e*=-1);return new mxPoint(Math.min(b.x+b.width,Math.ma
K;mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(b,a,d,e,c){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(e/2,f+g);b.lineTo(e/2,c);b.end();b.stroke();b.begin();b.moveTo((e-f)/2-g,f/2);b.quadTo((e-f)/2-g,f+g,e/2,f+g);b.quadTo((e+f)/2+g,f+g,(e+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
L;mxUtils.extend(P,mxCylinder);P.prototype.jettyWidth=32;P.prototype.jettyHeight=12;P.prototype.redrawPath=function(b,a,d,e,c,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=0.3*c-a/2,l=0.7*c-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(e,0),b.lineTo(e,c),b.lineTo(d,c),
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=P;mxUtils.extend(W,mxDoubleEllipse);W.prototype.outerStroke=!0;W.prototype.paintVertexShape=function(b,a,d,e,c){var f=Math.min(4,Math.min(e/5,c/5));0<e&&0<c&&(b.ellipse(a+f,d+f,e-2*f,c-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(a,d,e,c),b.stroke())};mxCellRenderer.prototype.defaultShapes.endState=
W;mxUtils.extend(V,W);V.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=V;mxUtils.extend(Q,mxArrowConnector);Q.prototype.defaultWidth=4;Q.prototype.isOpenEnded=function(){return!0};Q.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Q.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=Q;mxUtils.extend(F,mxArrowConnector);F.prototype.defaultWidth=
10;F.prototype.defaultArrowWidth=20;F.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};F.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};F.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=F;mxUtils.extend(S,
W;mxUtils.extend(V,W);V.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=V;mxUtils.extend(Q,mxArrowConnector);Q.prototype.defaultWidth=4;Q.prototype.isOpenEnded=function(){return!0};Q.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Q.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=Q;mxUtils.extend(E,mxArrowConnector);E.prototype.defaultWidth=
10;E.prototype.defaultArrowWidth=20;E.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};E.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};E.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=E;mxUtils.extend(S,
mxActor);S.prototype.size=30;S.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(c,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,c),new mxPoint(0,a),new mxPoint(e,0),new mxPoint(e,c)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.manualInput=S;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,e,c){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(e*g,c*g));g=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(a,d+f);b.lineTo(a+e,d+f);b.end();b.stroke();
b.begin();b.moveTo(a+g,d);b.lineTo(a+g,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=O;mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(b,a,d,e,c){a=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(e/2,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,
@ -2649,14 +2649,14 @@ mxCellRenderer.prototype.defaultShapes.partialRectangle=ca;mxUtils.extend(ga,mxE
c/2);b.moveTo(0,0);b.lineTo(e-a,0);b.quadTo(e,0,e,c/2);b.quadTo(e,c,e-a,c);b.lineTo(0,c);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.delay=ka;mxUtils.extend(ha,mxActor);ha.prototype.size=0.2;ha.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(c,e);var f=Math.max(0,Math.min(a,a*parseFloat(mxUtils.getValue(this.style,"size",this.size))));a=(c-f)/2;d=a+f;var g=(e-f)/2,f=g+f;b.moveTo(0,a);b.lineTo(g,a);b.lineTo(g,0);b.lineTo(f,0);b.lineTo(f,a);b.lineTo(e,a);b.lineTo(e,d);b.lineTo(f,d);
b.lineTo(f,c);b.lineTo(g,c);b.lineTo(g,d);b.lineTo(0,d);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.cross=ha;mxUtils.extend(pa,mxActor);pa.prototype.size=0.25;pa.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e,c/2);d=Math.min(e-a,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*e);b.moveTo(0,c/2);b.lineTo(d,0);b.lineTo(e-a,0);b.quadTo(e,0,e,c/2);b.quadTo(e,c,e-a,c);b.lineTo(d,c);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.display=pa;mxMarker.addMarker("dash",
function(b,a,d,e,c,f,g,k,l,m){var n=c*(g+l+1),p=f*(g+l+1);return function(){b.begin();b.moveTo(e.x-n/2-p/2,e.y-p/2+n/2);b.lineTo(e.x+p/2-3*n/2,e.y-3*p/2-n/2);b.stroke()}});mxMarker.addMarker("cross",function(b,a,d,e,c,f,g,k,l,m){var n=c*(g+l+1),p=f*(g+l+1);return function(){b.begin();b.moveTo(e.x-n/2-p/2,e.y-p/2+n/2);b.lineTo(e.x+p/2-3*n/2,e.y-3*p/2-n/2);b.moveTo(e.x-n/2+p/2,e.y-p/2-n/2);b.lineTo(e.x-p/2-3*n/2,e.y-3*p/2+n/2);b.stroke()}});mxMarker.addMarker("circle",xa);mxMarker.addMarker("circlePlus",
function(b,a,d,e,c,f,g,k,l,m){var n=e.clone(),p=xa.apply(this,arguments),q=c*(g+2*l),t=f*(g+2*l);return function(){p.apply(this,arguments);b.begin();b.moveTo(n.x-c*l,n.y-f*l);b.lineTo(n.x-2*q+c*l,n.y-2*t+f*l);b.moveTo(n.x-q-t+f*l,n.y-t+q-c*l);b.lineTo(n.x+t-q-f*l,n.y-t-q+c*l);b.stroke()}});mxMarker.addMarker("async",function(b,a,d,e,c,f,g,k,l,m){a=1.118*c*l;d=1.118*f*l;c*=g+l;f*=g+l;var n=e.clone();n.x-=a;n.y-=d;e.x+=1*-c-a;e.y+=1*-f-d;return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-
function(b,a,d,e,c,f,g,k,l,m){var n=e.clone(),p=xa.apply(this,arguments),q=c*(g+2*l),s=f*(g+2*l);return function(){p.apply(this,arguments);b.begin();b.moveTo(n.x-c*l,n.y-f*l);b.lineTo(n.x-2*q+c*l,n.y-2*s+f*l);b.moveTo(n.x-q-s+f*l,n.y-s+q-c*l);b.lineTo(n.x+s-q-f*l,n.y-s-q+c*l);b.stroke()}});mxMarker.addMarker("async",function(b,a,d,e,c,f,g,k,l,m){a=1.118*c*l;d=1.118*f*l;c*=g+l;f*=g+l;var n=e.clone();n.x-=a;n.y-=d;e.x+=1*-c-a;e.y+=1*-f-d;return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-
c-f/2,n.y-f+c/2):b.lineTo(n.x+f/2-c,n.y-f-c/2);b.lineTo(n.x-c,n.y-f);b.close();m?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(a,d,e,c,f,g,k,l,m,n){f*=k+m;g*=k+m;var p=c.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 ia=function(b,a,d,e,c){b=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);
b.execute=function(){for(var b=0;b<a.length;b++)this.copyStyle(a[b])};b.getPosition=d;b.setPosition=e;b.ignoreGrid=null!=c?c:!0;return b},na=function(b,a){return ia(b,[mxConstants.STYLE_ARCSIZE],function(d){var e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100,c=null!=a?a:d.height/8;return new mxPoint(d.x+d.width-Math.min(Math.max(d.width/2,d.height/2),Math.min(d.width,d.height)*e),d.y+c)},function(b,a,d){b=Math.min(50,Math.max(0,
100*(b.width-a.x+b.x)/Math.min(b.width,b.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(b)})},ma=function(){return function(b){var a=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(na(b));return a}},la=function(b){return function(a){var d=[ia(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+0.75*d*a.width,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,
Math.min(b,(d.x-a.x)/(0.75*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(na(a));return d}},ra=function(b,a,d){d=null!=d?d:1;return function(e){var c=[ia(e,["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(e.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(na(e));return c}},va=function(b,a,d){return function(e){var c=
[ia(e,["size"],function(d){var e=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+e,d.y+e)},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(e.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(na(e));return c}},za=function(b){return function(a){return[ia(a,["arrowWidth","arrowSize"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"arrowWidth",N.prototype.arrowWidth))),e=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",N.prototype.arrowSize)));return new mxPoint(a.x+(1-e)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},qa=function(b,a,d,e,c){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,t=Math.sqrt(p*p+q*q);return ia(b,a,function(b){b=e.call(this,t,p/t,q/t,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;c.call(this,b,p/b,q/b,m,n,a,d)})},Aa=function(b,a,d){return qa(b,["width"],a,function(a,e,c,f,g){g=b.shape.getEdgeWidth()*b.view.scale+d;return new mxPoint(f.x+e*a/4+c*g/2,f.y+c*a/4-e*g/2)},function(a,e,c,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*
1],p=n.x-m.x,q=n.y-m.y,s=Math.sqrt(p*p+q*q);return ia(b,a,function(b){b=e.call(this,s,p/s,q/s,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;c.call(this,b,p/b,q/b,m,n,a,d)})},Aa=function(b,a,d){return qa(b,["width"],a,function(a,e,c,f,g){g=b.shape.getEdgeWidth()*b.view.scale+d;return new mxPoint(f.x+e*a/4+c*g/2,f.y+c*a/4-e*g/2)},function(a,e,c,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})},wa={link:function(b){return[Aa(b,!0,10),Aa(b,!1,10)]},flexArrow:function(b){var a=b.view.graph.gridSize/b.view.scale,d=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(d.push(qa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(a,d,e,c,f){a=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(c.x+
d*(f+b.shape.strokewidth*b.view.scale)+e*a/2,c.y+e*(f+b.shape.strokewidth*b.view.scale)-d*a/2)},function(d,e,c,f,g,k,l){d=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));e=mxUtils.ptLineDist(f.x,f.y,f.x+c,f.y-e,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(e-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*d)/b.view.scale;mxEvent.isControlDown(l.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<a/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),d.push(qa(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(a,d,e,c,f){a=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(c.x+d*(f+b.shape.strokewidth*
@ -2681,8 +2681,8 @@ mxConstants.ALIGN_RIGHT&&(d=b.width-d);this.state.style.tabWidth=Math.round(d);t
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,2*((a.y-b.y)/b.height)))})]},offPageConnector:function(b){return[ia(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",U.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:ra(x.prototype.size,!0),hexagon:ra(v.prototype.size,!0,0.5),curlyBracket:ra(s.prototype.size,!1),display:ra(pa.prototype.size,!1),cube:va(1,a.prototype.size,!1),card:va(0.5,k.prototype.size,!0),loopLimit:va(0.5,da.prototype.size,!0),trapezoid:la(0.5),parallelogram:la(1)};Graph.createHandle=ia;Graph.handleFactory=wa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var b=
wa[this.state.style.shape];if(null!=b)return b(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var b=wa[this.state.style.shape];if(null!=b)return b(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sa=new mxPoint(1,0),ta=new mxPoint(1,0),la=mxUtils.toRadians(-30),ma=Math.cos(la),la=Math.sin(la),sa=mxUtils.getRotatedPoint(sa,ma,la),la=mxUtils.toRadians(-150),ma=Math.cos(la),la=Math.sin(la),
ta=mxUtils.getRotatedPoint(ta,ma,la);mxEdgeStyle.IsometricConnector=function(b,a,d,e,c){var f=b.view;e=null!=e&&0<e.length?e[0]:null;var g=b.absolutePoints,k=g[0],g=g[g.length-1];null!=e&&(e=f.transformControlPoint(b,e));null==k&&null!=a&&(k=new mxPoint(a.getCenterX(),a.getCenterY()));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));var l=sa.x,m=sa.y,n=ta.x,p=ta.y,q="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=k){var t=k;b=function(b,a,d){b-=t.x;var e=
a-t.y;a=(p*b-n*e)/(l*p-m*n);b=(m*b-l*e)/(m*n-l*p);q?(d&&(t=new mxPoint(t.x+l*a,t.y+m*a),c.push(t)),t=new mxPoint(t.x+n*b,t.y+p*b)):(d&&(t=new mxPoint(t.x+n*b,t.y+p*b),c.push(t)),t=new mxPoint(t.x+l*a,t.y+m*a));c.push(t)};null==e&&(e=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));b(e.x,e.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,a){if(a==mxEdgeStyle.IsometricConnector){var d=
ta=mxUtils.getRotatedPoint(ta,ma,la);mxEdgeStyle.IsometricConnector=function(b,a,d,e,c){var f=b.view;e=null!=e&&0<e.length?e[0]:null;var g=b.absolutePoints,k=g[0],g=g[g.length-1];null!=e&&(e=f.transformControlPoint(b,e));null==k&&null!=a&&(k=new mxPoint(a.getCenterX(),a.getCenterY()));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));var l=sa.x,m=sa.y,n=ta.x,p=ta.y,q="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=k){var s=k;b=function(b,a,d){b-=s.x;var e=
a-s.y;a=(p*b-n*e)/(l*p-m*n);b=(m*b-l*e)/(m*n-l*p);q?(d&&(s=new mxPoint(s.x+l*a,s.y+m*a),c.push(s)),s=new mxPoint(s.x+n*b,s.y+p*b)):(d&&(s=new mxPoint(s.x+n*b,s.y+p*b),c.push(s)),s=new mxPoint(s.x+l*a,s.y+m*a));c.push(s)};null==e&&(e=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));b(e.x,e.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,a){if(a==mxEdgeStyle.IsometricConnector){var d=
new mxElbowEdgeHandler(b);d.snapToTerminals=!1;return d}return Fa.apply(this,arguments)};c.prototype.constraints=[];f.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,
0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.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(0.5,
0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;b.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
@ -2815,9 +2815,9 @@ mxUtils.bind(this,function(f){e!=a&&(b?this.labelIndex=c:this.currentIndex=c,nul
m=l.cloneNode(!1);l.style.backgroundColor="#d7d7d7";m.style.backgroundColor="#d7d7d7";if(b)l.style.borderLeftWidth="0px";else{d.style.borderLeftWidth="0px";mxUtils.write(d,mxResources.get("style"));f.appendChild(d);var n=f.cloneNode(!1);n.style.display="none";this.panels.push(new StyleFormatPanel(this,a,n));this.container.appendChild(n);c(d,n,k++)}mxUtils.write(l,mxResources.get("text"));f.appendChild(l);d=f.cloneNode(!1);d.style.display="none";this.panels.push(new TextFormatPanel(this,a,d));this.container.appendChild(d);
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,s=mxUtils.bind(this,function(t){var q=k?parseFloat(a.value):parseInt(a.value);!isNaN(q)&&c==mxConstants.STYLE_ROTATION&&(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(b,Math.max(d,isNaN(q)?f:q));if(m.cellEditor.isContentEditing()&&g)p||(p=!0,null!=n&&(m.cellEditor.restoreSelection(n),n=null),g(q),a.value=q+
e,p=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{if(m.setCellStyles(c,q,m.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var s=m.getSelectionCells(),x=0;x<s.length;x++){var v=s[x];if(m.isHtmlLabel(v)){var z=document.createElement("div");z.innerHTML=m.convertValueToString(v);for(var A=z.getElementsByTagName("font"),y=0;y<A.length;y++)A[y].removeAttribute("size"),A[y].style.fontSize=q+"px";m.cellLabelChanged(v,
z.innerHTML)}}}finally{m.getModel().endUpdate()}l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",m.getSelectionCells()))}a.value=q+e;mxEvent.consume(t)});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",s);mxEvent.addListener(a,"blur",s);return s};
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,s=mxUtils.bind(this,function(s){var q=k?parseFloat(a.value):parseInt(a.value);!isNaN(q)&&c==mxConstants.STYLE_ROTATION&&(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(b,Math.max(d,isNaN(q)?f:q));if(m.cellEditor.isContentEditing()&&g)p||(p=!0,null!=n&&(m.cellEditor.restoreSelection(n),n=null),g(q),a.value=q+
e,p=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{if(m.setCellStyles(c,q,m.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var u=m.getSelectionCells(),x=0;x<u.length;x++){var v=u[x];if(m.isHtmlLabel(v)){var z=document.createElement("div");z.innerHTML=m.convertValueToString(v);for(var A=z.getElementsByTagName("font"),y=0;y<A.length;y++)A[y].removeAttribute("size"),A[y].style.fontSize=q+"px";m.cellLabelChanged(v,
z.innerHTML)}}}finally{m.getModel().endUpdate()}l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",m.getSelectionCells()))}a.value=q+e;mxEvent.consume(s)});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",s);mxEvent.addListener(a,"blur",s);return s};
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||
@ -2880,7 +2880,7 @@ l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px
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 s=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),q=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([s,t,q]);if(d.cellEditor.isContentEditing()){var u=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([u])}var x=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),v=this.editorUi.toolbar.addButton("geSprite-middle",
mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([x,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var A,y,D,B,C,E,G;d.cellEditor.isContentEditing()?(x.style.display="none",v.style.display="none",
mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([x,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var A,y,D,B,C,F,G;d.cellEditor.isContentEditing()?(x.style.display="none",v.style.display="none",
z.style.display="none",n.style.display="none",D=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([D,A=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),y=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
D.style.marginRight="9px",u=p.cloneNode(!1),u.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
!1,null)},u),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},u)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),u.style.height="40"),a.appendChild(u)):(m[2].style.marginRight="9px",q.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px";
@ -2889,8 +2889,8 @@ mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_R
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]},u=0;u<H.length;u++){var L=document.createElement("option");L.setAttribute("value",H[u]);mxUtils.write(L,mxResources.get(H[u]));I.appendChild(L)}p.appendChild(I);H=e.cloneNode(!1);H.style.marginLeft="0px";H.style.paddingTop=
"4px";H.style.paddingBottom="4px";H.style.fontWeight="normal";mxUtils.write(H,mxResources.get("writingDirection"));var P=document.createElement("select");P.style.position="absolute";P.style.right="20px";P.style.width="97px";P.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],W={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},u=0;u<L.length;u++){var V=document.createElement("option");V.setAttribute("value",L[u]);mxUtils.write(V,
mxResources.get(L[u]));P.appendChild(V)}H.appendChild(P);d.isEditing()||(a.appendChild(p),mxEvent.addListener(I,"change",function(b){d.getModel().beginUpdate();try{var a=K[I.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(H),mxEvent.addListener(P,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,W[P.value],d.getSelectionCells());mxEvent.consume(b)}));var Q=document.createElement("input");Q.style.textAlign="right";Q.style.marginTop="4px";mxClient.IS_QUIRKS||(Q.style.position="absolute",Q.style.right="32px");Q.style.width="46px";Q.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(Q);var F=null,p=this.installInputHandler(Q,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(b){F=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=F+"px";window.setTimeout(function(){Q.value=F+" pt";F=null},0);break}},!0),p=this.createStepper(Q,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=Q.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
a.appendChild(H),mxEvent.addListener(P,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,W[P.value],d.getSelectionCells());mxEvent.consume(b)}));var Q=document.createElement("input");Q.style.textAlign="right";Q.style.marginTop="4px";mxClient.IS_QUIRKS||(Q.style.position="absolute",Q.style.right="32px");Q.style.width="46px";Q.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(Q);var E=null,p=this.installInputHandler(Q,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(b){E=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=E+"px";window.setTimeout(function(){Q.value=E+" pt";E=null},0);break}},!0),p=this.createStepper(Q,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=Q.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 S=null,O="#ffffff",M=null,Z="#000000",N=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){S=b},destroy:function(){S=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");N.style.fontWeight="bold";var J=this.createCellColorOption(mxResources.get("borderColor"),
mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");J.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Z},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){M=b},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){N.style.display=null==b||b==mxConstants.NONE?"none":"";J.style.display=
N.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(N);d.cellEditor.isContentEditing()||g.appendChild(J);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",
@ -2899,8 +2899,8 @@ mxResources.get("spacing"));k.appendChild(p);var R,X,ea,da,U,aa=this.addUnitInpu
"pt",20,44,function(){U.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,ca=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(b){var a=""==b.value?120:parseInt(b.value),a=Math.max(120,isNaN(a)?120:a);null!=fa&&(d.cellEditor.restoreSelection(fa),fa=null);for(var e=d.getSelectedElement();null!=
e&&e.nodeType!=mxConstants.NODETYPE_ELEMENT;)e=e.parentNode;null!=e&&e==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("FONT"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="\x3cfont\x3e"+d.cellEditor.textarea.innerHTML+"\x3c/font\x3e"),e=d.cellEditor.textarea.firstChild);null!=e&&e!=d.cellEditor.textarea&&(e.style.lineHeight=a+"%");b.value=a+" %"},function(b){ca=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)}))];
this.styleButtons(k);this.styleButtons(p);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(g);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";p=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=C&&d.selectNode(d.insertColumn(C,null!=E?E.cellIndex:0))}catch(b){alert(b)}},k),
this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=C&&d.selectNode(d.insertColumn(C,null!=E?E.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=C&&null!=E&&d.deleteColumn(C,E.cellIndex)}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=C&&null!=G&&
this.styleButtons(k);this.styleButtons(p);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(g);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";p=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=C&&d.selectNode(d.insertColumn(C,null!=F?F.cellIndex:0))}catch(b){alert(b)}},k),
this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=C&&d.selectNode(d.insertColumn(C,null!=F?F.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=C&&null!=F&&d.deleteColumn(C,F.cellIndex)}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=C&&null!=G&&
d.selectNode(d.insertRow(C,G.sectionRowIndex))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=C&&null!=G&&d.selectNode(d.insertRow(C,G.sectionRowIndex+1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=C&&null!=G&&d.deleteRow(C,G.sectionRowIndex)}catch(b){alert(b)}},k)];this.styleButtons(p);p[2].style.marginRight="9px";g=this.createPanel();
g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("table")));g.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),g.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";p=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=C){var b=C.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+
("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){null==b||b==mxConstants.NONE?(C.removeAttribute("border"),C.style.border="",C.style.borderCollapse=""):(C.setAttribute("border","1"),C.style.border="1px solid "+b,C.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=C){var b=C.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
@ -2914,7 +2914,7 @@ a==mxConstants.TEXT_DIRECTION_RTL?P.value="rightToLeft":a==mxConstants.TEXT_DIRE
mxConstants.STYLE_SPACING_RIGHT,0)),ja.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=T)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),T.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),Y.value=isNaN(a)?"":a+" pt"});X=this.installInputHandler(ba,mxConstants.STYLE_SPACING,2,-999,999," pt");R=this.installInputHandler(aa,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");U=this.installInputHandler(ja,
mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");da=this.installInputHandler(T,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ea=this.installInputHandler(Y,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(Q,ga);this.addKeyHandler(ba,ga);this.addKeyHandler(aa,ga);this.addKeyHandler(ja,ga);this.addKeyHandler(T,ga);this.addKeyHandler(Y,ga);d.getModel().addListener(mxEvent.CHANGE,ga);this.listeners.push({destroy:function(){d.getModel().removeListener(ga)}});ga();if(d.cellEditor.isContentEditing()){var ka=
!1,e=function(){ka||(ka=!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(s,"left"==a.textAlign);c(t,"center"==a.textAlign);c(q,"right"==
a.textAlign);c(D,"justify"==a.textAlign);c(y,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(A,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));C=d.getParentByName(b,"TABLE",d.cellEditor.textarea);G=null==C?null:d.getParentByName(b,"TR",C);E=null==C?null:d.getParentByName(b,"TD",C);B.style.display=null!=C?"":"none";if(document.activeElement!=Q){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=F?(b.removeAttribute("size"),b.style.fontSize=F+"px",F=null):Q.value=parseFloat(a.fontSize)+
a.textAlign);c(D,"justify"==a.textAlign);c(y,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(A,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));C=d.getParentByName(b,"TABLE",d.cellEditor.textarea);G=null==C?null:d.getParentByName(b,"TR",C);F=null==C?null:d.getParentByName(b,"TD",C);B.style.display=null!=C?"":"none";if(document.activeElement!=Q){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=E?(b.removeAttribute("size"),b.style.fontSize=E+"px",E=null):Q.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);ca.value=e+" %"}b=a.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});e=a.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+
("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});null!=M&&(Z="#"==b.charAt(0)?b:"#000000",M(Z,!0));null!=S&&(O="#"==e.charAt(0)?e:null,S(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)}}ka=!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);
@ -2965,19 +2965,19 @@ null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.ed
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(u,8);this.addArrow(y);this.addArrow(D);
this.addArrow(B);z=this.addArrow(m,9);z.className="geIcon";z.style.width="84px";A=this.addArrow(n,9);A.className="geIcon";A.style.width="22px";var C=document.createElement("div");C.style.width="85px";C.style.height="1px";C.style.borderBottom="1px solid black";C.style.marginBottom="9px";z.appendChild(C);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid black";E.style.marginBottom="9px";A.appendChild(E);m.style.height="15px";n.style.height=
this.addArrow(B);z=this.addArrow(m,9);z.className="geIcon";z.style.width="84px";A=this.addArrow(n,9);A.className="geIcon";A.style.width="22px";var C=document.createElement("div");C.style.width="85px";C.style.height="1px";C.style.borderBottom="1px solid black";C.style.marginBottom="9px";z.appendChild(C);var F=document.createElement("div");F.style.width="23px";F.style.height="1px";F.style.borderBottom="1px solid black";F.style.marginBottom="9px";A.appendChild(F);m.style.height="15px";n.style.height=
"15px";u.style.height="15px";y.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(g);a.appendChild(q);a.appendChild(s);m=s.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 G,I,H=this.addUnitInput(m,"pt",74,33,function(){G.apply(this,arguments)}),K=this.addUnitInput(m,"pt",20,33,function(){I.apply(this,arguments)});mxUtils.br(m);z=document.createElement("div");z.style.height="8px";m.appendChild(z);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,P,W=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,arguments)}),V=this.addUnitInput(m,"pt",20,33,function(){P.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 Q,F=this.addUnitInput(g,"pt",20,41,function(){Q.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 S=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);return c}
mxResources.get("perimeter"));g.appendChild(n);var Q,E=this.addUnitInput(g,"pt",20,41,function(){Q.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 S=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);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!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.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)?C.style.borderBottom="1px dashed black":C.style.borderBottom="1px dotted black":C.style.borderBottom="1px solid black";E.style.borderBottom=C.style.borderBottom;a=y.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==
null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?C.style.borderBottom="1px dashed black":C.style.borderBottom="1px dotted black":C.style.borderBottom="1px solid black";F.style.borderBottom=C.style.borderBottom;a=y.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";u.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()?(q.style.display="",s.style.display="none"):(q.style.display="none",s.style.display="");a=g(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,
"startFill","1"),D,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),B,"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(y,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(D,30),mxUtils.setOpacity(B,
30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(B,100));if(f||document.activeElement!=V)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=W)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),W.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=K)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(a)?
"":a+" pt";if(f||document.activeElement!=W)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=F)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),F.value=isNaN(a)?"":a+" pt"});P=this.installInputHandler(V,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(W,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(K,
mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");G=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");Q=this.installInputHandler(F,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(x,S);this.addKeyHandler(V,S);this.addKeyHandler(W,S);this.addKeyHandler(K,S);this.addKeyHandler(H,S);this.addKeyHandler(F,S);b.getModel().addListener(mxEvent.CHANGE,S);this.listeners.push({destroy:function(){b.getModel().removeListener(S)}});
"":a+" pt";if(f||document.activeElement!=W)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=E)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),E.value=isNaN(a)?"":a+" pt"});P=this.installInputHandler(V,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(W,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(K,
mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");G=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");Q=this.installInputHandler(E,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(x,S);this.addKeyHandler(V,S);this.addKeyHandler(W,S);this.addKeyHandler(K,S);this.addKeyHandler(H,S);this.addKeyHandler(E,S);b.getModel().addListener(mxEvent.CHANGE,S);this.listeners.push({destroy:function(){b.getModel().removeListener(S)}});
S();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,e){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"),
@ -3947,13 +3947,13 @@ s.vertex=!0;var t=new mxCell("Message Type",new mxGeometry(0,440,200,20),"html\x
q.vertex=!0;var u=new mxCell("",new mxGeometry(370,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");u.vertex=!0;var x=new mxCell("Tap target",new mxGeometry(410,440,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");x.vertex=!0;var v=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;align\x3dleft;spacingLeft\x3d10;fontSize\x3d16;whiteSpace\x3dwrap;");
v.vertex=!0;var z=new mxCell("",new mxGeometry(780,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");z.vertex=!0;var A=new mxCell("Send to Group",new mxGeometry(0,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");A.vertex=!0;var y=new mxCell("Top Management",new mxGeometry(10,543,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;fontSize\x3d12;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
y.vertex=!0;var D=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");D.vertex=!0;var B=new mxCell("Design Department",new mxGeometry(10,583,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;fontSize\x3d12;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
B.vertex=!0;var C=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");C.vertex=!0;var E=new mxCell("Supply Department",new mxGeometry(10,623,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
E.vertex=!0;var G=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");G.vertex=!0;var I=new mxCell("",new mxGeometry(420,543,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");I.vertex=!0;var H=new mxCell("News",new mxGeometry(440,543,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
B.vertex=!0;var C=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");C.vertex=!0;var F=new mxCell("Supply Department",new mxGeometry(10,623,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
F.vertex=!0;var G=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");G.vertex=!0;var I=new mxCell("",new mxGeometry(420,543,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");I.vertex=!0;var H=new mxCell("News",new mxGeometry(440,543,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
H.vertex=!0;var K=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");K.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#55BFE0;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");L.vertex=!0;var P=new mxCell("",new mxGeometry(420,
583,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");P.vertex=!0;var W=new mxCell("Documents",new mxGeometry(440,583,70,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#EFAC43;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");W.vertex=!0;var V=new mxCell("",new mxGeometry(420,603,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");
V.vertex=!0;var Q=new mxCell("Media",new mxGeometry(440,603,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");Q.vertex=!0;var F=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");F.vertex=!0;var S=new mxCell("Text",new mxGeometry(440,623,30,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#999999;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
V.vertex=!0;var Q=new mxCell("Media",new mxGeometry(440,603,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");Q.vertex=!0;var E=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");E.vertex=!0;var S=new mxCell("Text",new mxGeometry(440,623,30,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#999999;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
S.vertex=!0;var O=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");O.vertex=!0;var M=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fillColor\x3d#ffffff;align\x3dcenter;rSize\x3d5;strokeColor\x3d#dddddd;fontSize\x3d16;whiteSpace\x3dwrap;");
M.vertex=!0;var Z=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");Z.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,s,t,q,u,x,v,z,A,y,D,B,C,E,G,I,H,K,L,P,W,V,Q,F,S,O,M,Z],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
M.vertex=!0;var Z=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");Z.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,s,t,q,u,x,v,z,A,y,D,B,C,F,G,I,H,K,L,P,W,V,Q,E,S,O,M,Z],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
0,800,50),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.horLines;strokeColor\x3d#dddddd;fillColor\x3d#fdfdfd;");c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,0.5,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;strokeColor\x3d#dddddd;fillColor\x3dnone;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d10;fontStyle\x3d1;");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,
0.5,90,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");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,0.5,120,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");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,0.5,100,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");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\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");
@ -7327,8 +7327,8 @@ e.getModel().beginUpdate();try{var f=e.view,k=e.getGraphBounds(),g=Math.ceil(Mat
d.src=c.target.result},c.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(c))};g.onerror=function(b){a.handleError(b)};g.send()}}else if("list"==c){if(0<d.length){var e=a.editor.graph,l=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle\x3d1;childLayout\x3dstackLayout;horizontal\x3d1;startSize\x3d26;fillColor\x3dnone;horizontalStack\x3d0;resizeParent\x3d1;resizeLast\x3d0;collapsible\x3d1;marginBottom\x3d0;swimlaneFillColor\x3d#ffffff;");l.vertex=!0;g=e.getPreferredSizeForCell(l);
null!=g&&l.geometry.width<g.width+10&&(l.geometry.width=g.width+10);if(1<d.length)for(var m=1;m<d.length;m++)if("--"==d[m])g=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth\x3d1;fillColor\x3dnone;align\x3dleft;verticalAlign\x3dmiddle;spacingTop\x3d-1;spacingLeft\x3d3;spacingRight\x3d3;rotatable\x3d0;labelPosition\x3dright;points\x3d[];portConstraint\x3deastwest;"),g.vertex=!0,l.geometry.height+=g.geometry.height,l.insert(g);else if(0<d[m].length&&";"!=d[m].charAt(0)){var A=new mxCell(d[m],
new mxGeometry(0,0,60,26),"text;strokeColor\x3dnone;fillColor\x3dnone;align\x3dleft;verticalAlign\x3dtop;spacingLeft\x3d4;spacingRight\x3d4;overflow\x3dhidden;rotatable\x3d0;points\x3d[[0,0.5],[1,0.5]];portConstraint\x3deastwest;");A.vertex=!0;g=e.getPreferredSizeForCell(A);null!=g&&A.geometry.width<g.width&&(A.geometry.width=g.width);l.geometry.width=Math.max(l.geometry.width,A.geometry.width);l.geometry.height+=A.geometry.height;l.insert(A)}var A=e.view,y=e.getGraphBounds(),g=Math.ceil(Math.max(0,
y.x/A.scale-A.translate.x)+4*e.gridSize),A=Math.ceil(Math.max(0,(y.y+y.height)/A.scale-A.translate.y)+4*e.gridSize);e.setSelectionCells(e.importCells([l],g,A));e.scrollCellToVisible(e.getSelectionCell())}}else{for(var D={},B=[],A=function(a){var b=D[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,D[a]=b,B.push(b));return b},m=0;m<d.length;m++)if(";"!=d[m].charAt(0)){var C=d[m].split("-\x3e");if(2==C.length){var y=A(C[0]),C=A(C[1]),E=new mxCell("",new mxGeometry);E.edge=!0;y.insertEdge(E,
!0);C.insertEdge(E,!1);B.push(E)}}if(0<B.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);e=new Graph(d);e.getModel().beginUpdate();try{B=e.importCells(B);for(m=0;m<B.length;m++)e.getModel().isVertex(B[m])&&(g=e.getPreferredSizeForCell(B[m]),B[m].geometry.width=Math.max(B[m].geometry.width,g.width),B[m].geometry.height=Math.max(B[m].geometry.height,g.height));l=new mxFastOrganicLayout(e);l.disableEdgeStyle=!1;l.forceConstant=120;l.execute(e.getDefaultParent());
y.x/A.scale-A.translate.x)+4*e.gridSize),A=Math.ceil(Math.max(0,(y.y+y.height)/A.scale-A.translate.y)+4*e.gridSize);e.setSelectionCells(e.importCells([l],g,A));e.scrollCellToVisible(e.getSelectionCell())}}else{for(var D={},B=[],A=function(a){var b=D[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,D[a]=b,B.push(b));return b},m=0;m<d.length;m++)if(";"!=d[m].charAt(0)){var C=d[m].split("-\x3e");if(2==C.length){var y=A(C[0]),C=A(C[1]),F=new mxCell("",new mxGeometry);F.edge=!0;y.insertEdge(F,
!0);C.insertEdge(F,!1);B.push(F)}}if(0<B.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);e=new Graph(d);e.getModel().beginUpdate();try{B=e.importCells(B);for(m=0;m<B.length;m++)e.getModel().isVertex(B[m])&&(g=e.getPreferredSizeForCell(B[m]),B[m].geometry.width=Math.max(B[m].geometry.width,g.width),B[m].geometry.height=Math.max(B[m].geometry.height,g.height));l=new mxFastOrganicLayout(e);l.disableEdgeStyle=!1;l.forceConstant=120;l.execute(e.getDefaultParent());
e.moveCells(B,20,20)}finally{e.getModel().endUpdate()}e.clearCellOverlays();A=a.editor.graph.view;y=a.editor.graph.getGraphBounds();g=Math.ceil(Math.max(0,y.x/A.scale-A.translate.x)+e.gridSize);A=Math.ceil(Math.max(0,(y.y+y.height)/A.scale-A.translate.y)+4*e.gridSize);a.editor.graph.setSelectionCells(a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),g,A));a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());e.destroy();d.parentNode.removeChild(d)}}}function d(){return"list"==
g.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"plantUmlPng"==g.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -\x3e Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -\x3e Bob: Another authentication Request\nAlice \x3c-- Bob: another authentication Response\n@enduml":"plantUmlSvg"==g.value?"@startuml\nskinparam shadowing false\nAlice -\x3e Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -\x3e Bob: Another authentication Request\nAlice \x3c-- Bob: another authentication Response\n@enduml":
";Example:\na-\x3eb\nb-\x3ec\nc-\x3ea\n"}var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.style.resize="none";e.style.width="100%";e.style.height="354px";e.style.marginBottom="16px";var g=document.createElement("select"),k=document.createElement("option");k.setAttribute("value","list");k.setAttribute("selected","selected");mxUtils.write(k,mxResources.get("list"));g.appendChild(k);k=document.createElement("option");k.setAttribute("value","diagram");
@ -7345,7 +7345,7 @@ var n=document.createElement("img");n.setAttribute("border","0");n.setAttribute(
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 s=null,t=null,q=null,u=mxUtils.button(mxResources.get("create"),function(){b()});u.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 v=document.createElement("div");v.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";f||(v.style.top="40px");var z=140,A=140,y={},D=1;y.basic=[{title:"blankDiagram",select:!0}];var B=y.basic;if(!c){l.appendChild(v);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&&(D++,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!=
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 F=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});F.className="geBtn";m.appendChild(F)}!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\x3d"+a.mode+"\x26title\x3d"+encodeURIComponent(p.value)+"\x26create\x3d"+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(u);!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){function p(b,c,d,
e){function f(){mxEvent.addListener(k,"click",function(){s(d);t(d)})}var k=document.createElement("a");k.style.overflow="hidden";var g=document.createElement("img");g.src=b;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";k.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";k.className="geBaseButton";k.style.position="relative";k.style.margin="4px";k.style.padding="8px 8px 10px 8px";k.style.whiteSpace="nowrap";
k.appendChild(g);mxClient.IS_QUIRKS&&(k.style.cssFloat="left",k.style.zoom="1");k.style.color="gray";k.style.fontSize="11px";var l=document.createElement("div");k.appendChild(l);mxUtils.write(l,c);if(null!=e&&null==a[e]){g.style.visibility="hidden";mxUtils.setOpacity(l,10);var m=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});m.spin(k);var n=window.setTimeout(function(){null==a[e]&&(m.stop(),k.style.display="none")},
@ -7381,9 +7381,9 @@ l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script\x3e"),l.wr
e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");l.appendChild(e);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.style.width="50px";l.appendChild(p);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));l.appendChild(e);var s=p.cloneNode(!0);l.appendChild(s);mxEvent.addListener(p,"focus",function(){n.checked=!0});mxEvent.addListener(s,
"focus",function(){n.checked=!0});mxEvent.addListener(p,"change",c);mxEvent.addListener(s,"change",c);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){k=e+1;p.value=k;s.value=k;break}p.setAttribute("max",g);s.setAttribute("max",g);1<g&&b.appendChild(l);var t=document.createElement("div");t.style.marginBottom="10px";var q=document.createElement("input");q.style.marginRight="8px";q.setAttribute("value","adjust");q.setAttribute("type",
"radio");q.setAttribute("name","printZoom");t.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));t.appendChild(e);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(){q.checked=!0});b.appendChild(t);var l=l.cloneNode(!1),x=q.cloneNode(!0);x.setAttribute("value","fit");q.setAttribute("checked","checked");e=document.createElement("div");
e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(x);l.appendChild(e);t=document.createElement("table");t.style.display="inline-block";var v=document.createElement("tbody"),z=document.createElement("tr"),A=z.cloneNode(!0),y=document.createElement("td"),D=y.cloneNode(!0),B=y.cloneNode(!0),C=y.cloneNode(!0),E=y.cloneNode(!0),G=y.cloneNode(!0);y.style.textAlign="right";C.style.textAlign="right";mxUtils.write(y,mxResources.get("fitTo"));var I=document.createElement("input");
I.style.cssText="margin:0 8px 0 8px;";I.setAttribute("value","1");I.setAttribute("min","1");I.setAttribute("type","number");I.style.width="40px";D.appendChild(I);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));B.appendChild(e);mxUtils.write(C,mxResources.get("fitToBy"));var H=I.cloneNode(!0);E.appendChild(H);mxEvent.addListener(I,"focus",function(){x.checked=!0});mxEvent.addListener(H,"focus",function(){x.checked=!0});e=document.createElement("span");mxUtils.write(e,
mxResources.get("fitToSheetsDown"));G.appendChild(e);z.appendChild(y);z.appendChild(D);z.appendChild(B);A.appendChild(C);A.appendChild(E);A.appendChild(G);v.appendChild(z);v.appendChild(A);t.appendChild(v);l.appendChild(t);b.appendChild(l);l=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));l.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(e,
e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(x);l.appendChild(e);t=document.createElement("table");t.style.display="inline-block";var v=document.createElement("tbody"),z=document.createElement("tr"),A=z.cloneNode(!0),y=document.createElement("td"),D=y.cloneNode(!0),B=y.cloneNode(!0),C=y.cloneNode(!0),F=y.cloneNode(!0),G=y.cloneNode(!0);y.style.textAlign="right";C.style.textAlign="right";mxUtils.write(y,mxResources.get("fitTo"));var I=document.createElement("input");
I.style.cssText="margin:0 8px 0 8px;";I.setAttribute("value","1");I.setAttribute("min","1");I.setAttribute("type","number");I.style.width="40px";D.appendChild(I);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));B.appendChild(e);mxUtils.write(C,mxResources.get("fitToBy"));var H=I.cloneNode(!0);F.appendChild(H);mxEvent.addListener(I,"focus",function(){x.checked=!0});mxEvent.addListener(H,"focus",function(){x.checked=!0});e=document.createElement("span");mxUtils.write(e,
mxResources.get("fitToSheetsDown"));G.appendChild(e);z.appendChild(y);z.appendChild(D);z.appendChild(B);A.appendChild(C);A.appendChild(F);A.appendChild(G);v.appendChild(z);v.appendChild(A);t.appendChild(v);l.appendChild(t);b.appendChild(l);l=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));l.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(e,
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);l.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));l.appendChild(e);var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","100 %");L.style.width="60px";l.appendChild(L);b.appendChild(l);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
l.className="geBtn";a.editor.cancelFirst&&e.appendChild(l);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947-how-to-print-")}),t.className="geBtn",e.appendChild(t));mxClient.IS_CHROMEAPP||(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),t.className="geBtn",e.appendChild(t));t=mxUtils.button(mxResources.get(mxClient.IS_CHROMEAPP?"ok":"print"),function(){a.hideDialog();f(!0)});t.className=
"geBtn gePrimaryBtn";e.appendChild(t);a.editor.cancelFirst||e.appendChild(l);b.appendChild(e);this.container=b};
@ -7411,18 +7411,18 @@ v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute
"geSprite geSprite-fit";A.setAttribute("title",mxResources.get("fit"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var y=mxUtils.button("",function(){null!=u&&(g.zoomActual(),g.center())});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var D=
document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var B=mxUtils.button(mxResources.get("download"),function(){if(null!=u){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(u.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
(c="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(c):"\x26data\x3d"+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename\x3d"+encodeURIComponent(b)+"\x26format\x3dxml"+c)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var C=mxUtils.button(mxResources.get("restore"),function(){null!=u&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&s.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)})})});C.className="geBtn";C.setAttribute("disabled","disabled");var E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var G=null;mxEvent.addListener(E,
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)})})});C.className="geBtn";C.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var G=null;mxEvent.addListener(F,
"change",function(a){null!=G&&(G(a),mxEvent.consume(a))});var I=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=u&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(u.documentElement)),window.openWindow(a.getUrl()))});I.className="geBtn";I.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("show"),function(){null!=q&&window.open(q.getUrl())});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");
d=document.createElement("div");d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var K=document.createElement("div");K.className="geToolbarContainer";K.style.backgroundColor="transparent";K.style.padding="2px";K.style.border="none";K.style.left="199px";K.style.top="442px";var L=null;if(null==s||null==a.drive&&s.constructor==window.DriveFile||null==a.dropbox&&s.constructor==window.DropboxFile)e.style.display="none",K.style.display="none",mxUtils.write(b,
mxResources.get("notAvailable"));else if(null!=c&&0<c.length){e.style.cursor="move";var P=document.createElement("table");P.style.border="1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var W=document.createElement("tbody"),V=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var Q=c.length-1;0<=Q;Q--){var F=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");
mxResources.get("notAvailable"));else if(null!=c&&0<c.length){e.style.cursor="move";var P=document.createElement("table");P.style.border="1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var W=document.createElement("tbody"),V=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var Q=c.length-1;0<=Q;Q--){var E=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");
f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var n=document.createElement("td");n.style.padding="6px";n.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(n,mxResources.get("current")):d.toDateString()===V?mxUtils.write(n,d.toLocaleTimeString()):mxUtils.write(n,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(n);f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=
b.lastModifyingUserName?" "+b.lastModifyingUserName:""));var K=function(b){p.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){E.style.display="none";E.innerHTML="";u=c;x=b;l=parseSelectFunction=null;m=0;var q=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},t=function(b){null!=b&&
(b=q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b};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){E.removeAttribute("disabled");E.style.display="";for(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"),E.appendChild(c)}G=function(){m=k=parseInt(E.value);t(l[k])}}else q(n);D.innerHTML="";mxUtils.write(D,d.toLocaleDateString()+" "+d.toLocaleTimeString());D.setAttribute("title",f.getAttribute("title"));v.removeAttribute("disabled");z.removeAttribute("disabled");A.removeAttribute("disabled");y.removeAttribute("disabled");if(null==s||!s.isRestricted())a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),B.removeAttribute("disabled"),H.removeAttribute("disabled"),I.removeAttribute("disabled");
mxUtils.setOpacity(v,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(y,60)}else E.style.display="none",E.innerHTML="",D.innerHTML="",mxUtils.write(D,mxResources.get("errorLoadingFile"))};mxEvent.addListener(f,"click",function(a){q!=b&&(p.stop(),null!=t&&(t.style.backgroundColor=""),q=b,t=f,t.style.backgroundColor="#ebf2f9",x=u=null,D.removeAttribute("title"),D.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),C.setAttribute("disabled",
"disabled"),B.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(y,20),p.spin(e),b.getXml(function(a){q==b&&K(a)},function(a){p.stop();E.style.display="none";
E.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){H.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);W.appendChild(f)}return f}(c[Q]);null!=F&&Q==c.length-1&&(L=F)}P.appendChild(W);b.appendChild(P)}else e.style.display="none",K.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";K.appendChild(E);K.appendChild(v);K.appendChild(z);K.appendChild(y);K.appendChild(A);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(B),d.appendChild(I),d.appendChild(C),d.appendChild(H)):(d.appendChild(B),d.appendChild(I),d.appendChild(C),d.appendChild(H),d.appendChild(b));f.appendChild(d);f.appendChild(K);f.appendChild(D);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),
b.lastModifyingUserName?" "+b.lastModifyingUserName:""));var K=function(b){p.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){F.style.display="none";F.innerHTML="";u=c;x=b;l=parseSelectFunction=null;m=0;var q=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},t=function(b){null!=b&&
(b=q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b};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){F.removeAttribute("disabled");F.style.display="";for(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"),F.appendChild(c)}G=function(){m=k=parseInt(F.value);t(l[k])}}else q(n);D.innerHTML="";mxUtils.write(D,d.toLocaleDateString()+" "+d.toLocaleTimeString());D.setAttribute("title",f.getAttribute("title"));v.removeAttribute("disabled");z.removeAttribute("disabled");A.removeAttribute("disabled");y.removeAttribute("disabled");if(null==s||!s.isRestricted())a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),B.removeAttribute("disabled"),H.removeAttribute("disabled"),I.removeAttribute("disabled");
mxUtils.setOpacity(v,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(y,60)}else F.style.display="none",F.innerHTML="",D.innerHTML="",mxUtils.write(D,mxResources.get("errorLoadingFile"))};mxEvent.addListener(f,"click",function(a){q!=b&&(p.stop(),null!=t&&(t.style.backgroundColor=""),q=b,t=f,t.style.backgroundColor="#ebf2f9",x=u=null,D.removeAttribute("title"),D.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),C.setAttribute("disabled",
"disabled"),B.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(y,20),p.spin(e),b.getXml(function(a){q==b&&K(a)},function(a){p.stop();F.style.display="none";
F.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){H.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);W.appendChild(f)}return f}(c[Q]);null!=E&&Q==c.length-1&&(L=E)}P.appendChild(W);b.appendChild(P)}else e.style.display="none",K.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";K.appendChild(F);K.appendChild(v);K.appendChild(z);K.appendChild(y);K.appendChild(A);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(B),d.appendChild(I),d.appendChild(C),d.appendChild(H)):(d.appendChild(B),d.appendChild(I),d.appendChild(C),d.appendChild(H),d.appendChild(b));f.appendChild(d);f.appendChild(K);f.appendChild(D);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),s=0,t=null,q=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[s]?t[s].getAttribute("name"):"pagenumber"==a?s+1:q.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 u=
@ -7431,7 +7431,7 @@ d=mxUtils.button(e||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";
mxConstants.NONE)c="#ffffff";m.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(d))).documentElement));return d}mxEvent.addListener(x,"change",function(a){s=parseInt(x.value);c(t[s]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var d=p.getElementsByTagName("diagram");t=[];for(var e=0;e<d.length;e++)t.push(d[e]);0<t.length&&c(t[s]);if(1<t.length){x.style.display=
"";for(e=0;e<t.length;e++)d=document.createElement("option"),mxUtils.write(d,t[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==s&&d.setAttribute("selected","selected"),x.appendChild(d)}}else b(p)};g.appendChild(x);g.appendChild(c);g.appendChild(f);g.appendChild(u);g.appendChild(l);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";a.editor.cancelFirst?(e.appendChild(c),e.appendChild(b),e.appendChild(d)):(e.appendChild(d),
e.appendChild(b),e.appendChild(c));k.appendChild(e);k.appendChild(g);this.container=k},FindWindow=function(a,c,f,d,b){function e(){var a=k.model.getDescendants(k.model.getRoot()),b=p.value.toLowerCase(),c=s.checked?RegExp(b):null,d=null;l!=b&&(l=b,m=null);var e=null==m;if(k.isEnabled()&&0<b.length)for(var f=0;f<a.length;f++){var g=k.view.getState(a[f]);if(null!=g&&null!=g.cell.value&&(e||null==d)&&(k.model.isVertex(g.cell)||k.model.isEdge(g.cell))){k.isHtmlLabel(g.cell)?(t.innerHTML=k.getLabel(g.cell),
label=mxUtils.extractTextWithWhitespace([t])):label=k.getLabel(g.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var n;if(!(n=null==c&&label.substring(0,b.length)===b))if(n=null!=c)if(!(n=c.test(label)))a:{n=c;var q=g.cell;if("object"===typeof q.value&&null!=q.value.attributes)for(var q=q.value.attributes,E=0;E<q.length;E++)if("label"!=q[E].nodeName&&n.test(q[E].nodeValue.toLowerCase())){n=!0;break a}n=!1}if(n)if(e){d=g;break}else null==d&&(d=g)}e=e||g==m}null!=
label=mxUtils.extractTextWithWhitespace([t])):label=k.getLabel(g.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var n;if(!(n=null==c&&label.substring(0,b.length)===b))if(n=null!=c)if(!(n=c.test(label)))a:{n=c;var q=g.cell;if("object"===typeof q.value&&null!=q.value.attributes)for(var q=q.value.attributes,F=0;F<q.length;F++)if("label"!=q[F].nodeName&&n.test(q[F].nodeValue.toLowerCase())){n=!0;break a}n=!1}if(n)if(e){d=g;break}else null==d&&(d=g)}e=e||g==m}null!=
d?(m=d,k.setSelectionCell(m.cell),k.scrollCellToVisible(m.cell)):k.clearSelection();return!k.isEnabled()||0==b.length||null!=d}var g=a.actions.get("find"),k=a.editor.graph,l=null,m=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width=
"170px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";n.appendChild(p);var s=document.createElement("input");s.setAttribute("type","checkbox");n.appendChild(s);mxUtils.write(n,mxResources.get("regularExpression"));var t=document.createElement("div");mxUtils.br(n);var q=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";l=m=null;p.focus()});q.setAttribute("title",mxResources.get("reset"));q.style.marginTop="6px";q.style.marginRight="4px";
q.style.backgroundColor="#f5f5f5";q.style.backgroundImage="none";q.className="geBtn";n.appendChild(q);q=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=e()?"":"#ffcfcf"}catch(b){a.handleError(b)}});q.setAttribute("title",mxResources.get("find")+" (Enter)");q.style.marginTop="6px";q.style.backgroundColor="#4d90fe";q.style.backgroundImage="none";q.className="geBtn gePrimaryBtn";n.appendChild(q);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);
@ -7446,12 +7446,12 @@ C.view.getState(a[c]);if(null!=d){for(var e=C.cellRenderer.getShapesForState(d),
function k(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="1";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition","all 1s ease-in-out"),a[b].style.opacity="0"},0)}}function l(a){var b=a.absolutePoints.slice(),c=a.segments,d=a.length,e=b.length;return{execute:function(f,k){if(null!=a.shape){for(var g=[b[0]],l=d*f/k,m=1;m<e;m++)if(l<=c[m-1]){g.push(new mxPoint(b[m-1].x+(b[m].x-b[m-
1].x)*l/c[m-1],b[m-1].y+(b[m].y-b[m-1].y)*l/c[m-1]));break}else l-=c[m-1],g.push(b[m]);a.shape.points=g;a.shape.redraw()}},stop:function(){null!=a.shape&&(a.shape.points=b,a.shape.redraw())}}}function m(a){var b=new mxRectangle.fromRectangle(a.shape.bounds),c=null;null!=a.text&&null!=a.text.node&&null!=a.text.node.firstChild&&(c=a.text.node.firstChild.getAttribute("transform"));return{execute:function(d,e){if(null!=a.shape){var f=d/e;a.shape.bounds=new mxRectangle(b.x,b.y,b.width*f,b.height);a.shape.redraw();
null!=c&&a.text.node.firstChild.setAttribute("transform",c+" scale("+f+",1)")}},stop:function(){null!=a.shape&&(a.shape.bounds=b,a.shape.redraw(),null!=c&&a.text.node.firstChild.setAttribute("transform",c))}}}function n(a,b,c){function d(){if(g==b){window.clearInterval(n);for(var a=0;a<e.length;a++)e[a].stop()}else{for(a=0;a<e.length;a++)e[a].execute(g,b);g++}}b=null!=b?b:30;c=null!=c?c:30;for(var e=[],f=0;f<a.length;f++){var k=C.view.getState(a[f]);null!=k&&null!=k.shape&&C.model.isEdge(k.cell)&&
null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&C.model.isVertex(k.cell)&&(null!=k.shape&&null!=k.shape.bounds)&&e.push(m(k))}var g=0,n=window.setInterval(d,c);d()}function p(a,b,c){c=null!=c?c:{};c[a.id]=b;for(var d=a.getChildCount(),e=0;e<d;e++)p(a.getChildAt(e),b.getChildAt(e),c);return c}function s(){if(!G){G=E=!0;C.getModel().clear();C.getModel().setRoot(C.cloneCells([a.editor.graph.getModel().getRoot()])[0]);C.maxFitScale=1;C.fit(8);C.center();C.getModel().beginUpdate();
try{for(var b in C.getModel().cells){var c=C.getModel().cells[b];if(C.getModel().isVertex(c)||C.getModel().isEdge(c))C.setCellStyles("opacity","0",[c]),C.setCellStyles("noLabel","1",[c])}}finally{C.getModel().endUpdate()}var d=p(a.editor.graph.getModel().getRoot(),C.getModel().getRoot()),f=y.value.split("\n"),l=0,m=function(){if(E&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;m()},parseFloat(a[1]));else{if(1<a.length){var c=d[a[1]];null!=
null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&C.model.isVertex(k.cell)&&(null!=k.shape&&null!=k.shape.bounds)&&e.push(m(k))}var g=0,n=window.setInterval(d,c);d()}function p(a,b,c){c=null!=c?c:{};c[a.id]=b;for(var d=a.getChildCount(),e=0;e<d;e++)p(a.getChildAt(e),b.getChildAt(e),c);return c}function s(){if(!G){G=F=!0;C.getModel().clear();C.getModel().setRoot(C.cloneCells([a.editor.graph.getModel().getRoot()])[0]);C.maxFitScale=1;C.fit(8);C.center();C.getModel().beginUpdate();
try{for(var b in C.getModel().cells){var c=C.getModel().cells[b];if(C.getModel().isVertex(c)||C.getModel().isEdge(c))C.setCellStyles("opacity","0",[c]),C.setCellStyles("noLabel","1",[c])}}finally{C.getModel().endUpdate()}var d=p(a.editor.graph.getModel().getRoot(),C.getModel().getRoot()),f=y.value.split("\n"),l=0,m=function(){if(F&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;m()},parseFloat(a[1]));else{if(1<a.length){var c=d[a[1]];null!=
c?"show"==a[0]?(C.setCellStyles("opacity","100",[c]),C.setCellStyles("noLabel",null,[c]),2<a.length&&"fade"==a[2]?g(e([c])):n([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;m()}}else G=!1};m()}}var t=document.createElement("table");t.style.width="100%";t.style.height="100%";var q=document.createElement("tbody"),u=document.createElement("tr"),x=document.createElement("td");x.style.width="140px";var v=document.createElement("td"),z=document.createElement("tr");z.style.height=
"40px";var A=document.createElement("td");A.setAttribute("colspan","2");var y=document.createElement("textarea");y.style.overflow="auto";y.style.width="100%";y.style.height="100%";x.appendChild(y);var D=a.editor.graph.getModel().getRoot();null!=D.value&&"object"==typeof D.value&&(y.value=D.value.getAttribute("animation"));var B=document.createElement("div");B.style.border="1px solid lightGray";B.style.background="#ffffff";B.style.width="100%";B.style.height="100%";B.style.overflow="auto";mxEvent.disableContextMenu(B);
v.appendChild(B);var C=new Graph(B);C.setEnabled(!1);C.setPanning(!0);C.foldingEnabled=!1;C.panningHandler.ignoreCell=!0;C.panningHandler.useLeftButtonForPanning=!0;C.minFitScale=null;C.maxFitScale=null;C.centerZoom=!0;var E=!1,G=!1,B=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+" fade\n";y.value+="wait 1000\n"}});A.appendChild(B);B=mxUtils.button("Wipe In",function(){var b=a.editor.graph.getSelectionCells();
if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+"\n";y.value+="wait 1000\n"}});A.appendChild(B);B=mxUtils.button("Fade Out",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"hide "+b[c].id+"\n";y.value+="wait 1000\n"}});A.appendChild(B);B=mxUtils.button("Wait",function(){y.value+="wait 1000\n"});A.appendChild(B);B=mxUtils.button("Preview",function(){s()});A.appendChild(B);B=mxUtils.button("Stop",function(){E=!1;
v.appendChild(B);var C=new Graph(B);C.setEnabled(!1);C.setPanning(!0);C.foldingEnabled=!1;C.panningHandler.ignoreCell=!0;C.panningHandler.useLeftButtonForPanning=!0;C.minFitScale=null;C.maxFitScale=null;C.centerZoom=!0;var F=!1,G=!1,B=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+" fade\n";y.value+="wait 1000\n"}});A.appendChild(B);B=mxUtils.button("Wipe In",function(){var b=a.editor.graph.getSelectionCells();
if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+"\n";y.value+="wait 1000\n"}});A.appendChild(B);B=mxUtils.button("Fade Out",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"hide "+b[c].id+"\n";y.value+="wait 1000\n"}});A.appendChild(B);B=mxUtils.button("Wait",function(){y.value+="wait 1000\n"});A.appendChild(B);B=mxUtils.button("Preview",function(){s()});A.appendChild(B);B=mxUtils.button("Stop",function(){F=!1;
C.getModel().clear()});A.appendChild(B);B=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(D,"animation",y.value)});A.appendChild(B);D=a.editor.graph.getModel().getRoot();u.appendChild(x);u.appendChild(v);q.appendChild(u);z.appendChild(A);q.appendChild(z);t.appendChild(q);this.window=new mxWindow("Animation",t,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)},AuthDialog=
function(a,c,f,d){var b=document.createElement("div");b.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var g="Unknown",k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.marginRight="10px";c==a.drive?(g=mxResources.get("googleDrive"),k.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
(g=mxResources.get("dropbox"),k.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive&&(g=mxResources.get("oneDrive"),k.src=IMAGE_PATH+"/onedrive-logo-white.svg");c=document.createElement("p");mxUtils.write(c,mxResources.get("authorizeThisAppIn",[g]));var l=document.createElement("input");l.setAttribute("type","checkbox");g=mxUtils.button(mxResources.get("authorize"),function(){a.hideDialog(!1);d(l.checked)});g.insertBefore(k,g.firstChild);g.style.marginTop="6px";g.className="geBigButton";b.appendChild(e);
@ -7548,7 +7548,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[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.0.3.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
(function(){EditorUi.VERSION="6.0.3.5";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(function(){EditorUi.prototype.useCanvasForExport=!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(d){}};
b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=
function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),
@ -7619,38 +7619,36 @@ typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=docum
!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(g){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml\x3d"+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"\x26mime\x3d"+c:"")+(null!=e?"\x26format\x3d"+e:"")+(null!=f?"\x26base64\x3d"+f:"")+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):"")+(d?
"\x26binary\x3d1":""))};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 q=1024*g,u=Math.min(q+1024,d),x=Array(u-q),v=0;q<u;++v,++q)x[v]=c[q].charCodeAt(0);f[g]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){var f=!mxClient.IS_IOS||!navigator.standalone;e=!this.isOfflineApp()&&!this.isOffline()&&("function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||
"function"===typeof window.OneDriveClient);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):null!=c&&"image/"==c.substring(0,6)&&("image/svg"!=c.substring(0,9)||mxClient.IS_SVG)?mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode?(f.document.write('\x3chtml\x3e\x3cimg src\x3d"data:'+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))+'"/\x3e\x3c/html\x3e'),f.document.close()):f.location.replace("data:"+
c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}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(g){this.handleError(g)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,f);this.showDialog(b.container,380,e?280:160,!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,e=!this.isOfflineApp()&&!this.isOffline()&&("function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||"function"===typeof window.OneDriveClient);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())this.handleError({message:mxResources.get("errorSavingFile")});else try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),
a,f,!0,d,c)}catch(g){this.handleError(g)}}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d);this.showDialog(a.container,380,e?280:160,!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){if(this.spinner.spin(document.body,mxResources.get("export"))){var q=
this.editor.graph.isSelectionEmpty();c=null!=c?c:q;q=b?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&!1==b&&(q="#ffffff");var u=this.editor.graph.getSvg(q,a,null,g,null,c);d&&this.editor.addSvgShadow(u);a=this.getCurrentFile();var x=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=x.lastIndexOf(".");0<a&&(x=x.substring(0,a));var x=x+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));
var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(x,"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,u,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(u,
v,this.thumbImageCache)):v(u)}))}};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.showRemoteExportDialog=function(a,b,c){var d=document.createElement("div");d.style.padding="6px";var e=document.createElement("h3");
mxUtils.write(e,mxResources.get("export")+" "+mxResources.get("image"));e.style.marginTop="0px";e.style.marginBottom="8px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,140,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e){var f=
this.editor.graph,g=document.createElement("div");g.style.paddingTop="10px";g.style.paddingRight="8px";var q=240,u=this.addCheckbox(g,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background),x=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");e&&(g.appendChild(v),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),
q+=26);f.isSelectionEmpty()&&v.setAttribute("disabled","disabled");var z=this.addCheckbox(g,mxResources.get("shadow"),f.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&A.setAttribute("disabled","disabled");a&&(g.appendChild(A),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),q+=26);var y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight=
"8px";y.setAttribute("type","checkbox");y.style.marginBottom="8px";y.setAttribute("checked","checked");y.defaultChecked=!0;g.appendChild(y);mxUtils.write(g,mxResources.get("includeCopyOfMyDiagram"));a=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,u.checked,!x.checked,z.checked,y.checked,A.checked,v.checked)}),mxResources.get("zoom")+" (%)",null,g,!this.isOffline()?c:null);this.showDialog(a.container,320,q,!0,!0);a.init()};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,q){var u=
this.getCurrentFile(),x=[];d&&(x.push("chrome\x3d0"),x.push("lightbox\x3d1"),"auto"!=a&&x.push("target\x3d"+a),null!=b&&x.push("highlight\x3d"+("#"==b.charAt(0)?b.substring(1):b)),e&&x.push("edit\x3d_blank"),f&&x.push("layers\x3d1"));null!=u&&null!=u.getTitle()&&x.push("title\x3d"+encodeURIComponent(u.getTitle()));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&x.push("page\x3d"+a);break}a="";null!=g?a="#U"+encodeURIComponent(g):
(u=this.getCurrentFile(),a=!q&&null!=u&&u.constructor==DriveFile?"#"+u.getHash():"#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<x.length?"?"+x.join("\x26"):"")+a};EditorUi.prototype.showEmbedHtmlDialog=function(a,b){function c(){null==z||z==mxConstants.NONE?(v.style.backgroundColor="",v.style.backgroundImage="url('"+
Dialog.prototype.noColorImage+"')"):(v.style.backgroundColor=z,v.style.backgroundImage="")}var d=document.createElement("div");d.style.padding="6px";d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);e=document.createElement("div");e.style.cssText="border-bottom:1px solid lightGray;padding-bottom:6px;margin-bottom:8px;";var f=document.createElement("input");
f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");var g=f.cloneNode(!0);g.setAttribute("value","copy");e.appendChild(g);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));e.appendChild(q);mxUtils.br(e);e.appendChild(f);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));e.appendChild(q);var u=this.getCurrentFile();
null==a&&null!=u&&u.constructor==DriveFile&&(q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(u.getId())})),q.style.marginTop="12px",q.style.marginLeft="8px",q.className="geBtn",e.appendChild(q));g.setAttribute("checked","checked");null==a&&f.setAttribute("disabled","disabled");d.appendChild(e);mxUtils.write(d,mxResources.get("link")+":");var x=document.createElement("select");x.style.width="100px";x.style.marginLeft="6px";x.style.marginRight=
"10px";x.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));x.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));x.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));x.appendChild(e);d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var v=
document.createElement("button");v.style.width="18px";v.style.height="18px";v.style.marginLeft="6px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";var z="#0000ff";c();mxEvent.addListener(v,"click",mxUtils.bind(this,function(a){this.pickColor(z||"none",function(a){z=a;c()});mxEvent.consume(a)}));d.appendChild(v);mxUtils.br(d);var A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var y=document.createElement("input");y.setAttribute("type",
"text");y.style.marginRight="16px";y.style.width="40px";y.style.marginLeft="6px";y.style.marginRight="12px";y.value="100%";d.appendChild(y);var D=this.addCheckbox(d,mxResources.get("fit"),!0),e=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(d,mxResources.get("allPages"),e,!e),C=this.addCheckbox(d,mxResources.get("layers"),!0),E=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addCheckbox(d,mxResources.get("showEditButton"),!0);G.style.marginLeft="24px";G.style.marginBottom="8px";
mxEvent.addListener(E,"change",function(){E.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")});d=new CustomDialog(this,d,mxUtils.bind(this,function(){b(f.checked?a:null,A.checked,y.value,x.value,z,D.checked,B.checked,C.checked,E.checked,G.checked)}),null,mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542-how-to-embed-html-");this.showDialog(d.container,320,360,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,
e){function f(){null==D||D==mxConstants.NONE?(y.style.backgroundColor="",y.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(y.style.backgroundColor=D,y.style.backgroundImage="")}var g=document.createElement("div");g.style.padding="6px";var q=document.createElement("h3");mxUtils.write(q,a||mxResources.get("link"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(q);var u=this.getCurrentFile();a=0;if(null!=u&&u.constructor==DriveFile&&
!b){a=80;q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;padding-top:6px;margin-bottom:12px;text-align:center;";mxUtils.write(q,mxResources.get("linkAccountRequired"));mxUtils.br(q);var x=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(u.getId())}));x.style.marginTop="12px";x.className="geBtn";q.appendChild(x);g.appendChild(q);x=document.createElement("a");x.style.paddingLeft="12px";x.style.color=
"gray";x.style.fontSize="11px";x.setAttribute("href","javascript:void(0);");mxUtils.write(x,mxResources.get("check"));q.appendChild(x);mxEvent.addListener(x,"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,340,80,!0,!1);
a.init()}))}))}var v=null,z=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),v=document.createElement("input"),v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginTop="16px",v.style.marginLeft="6px",v.style.marginRight="16px",v.value="100%",g.appendChild(v),mxUtils.write(g,mxResources.get("height")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.width="50px",z.style.marginTop="16px",z.style.marginLeft=
"6px",z.style.marginBottom="6px",z.value=d+"px",g.appendChild(z),mxUtils.br(g);mxUtils.write(g,mxResources.get("link")+":");var A=document.createElement("select");A.style.width="100px";A.style.marginLeft="6px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));
A.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));A.appendChild(c);g.appendChild(A);mxUtils.write(g,mxResources.get("borderColor")+":");var y=document.createElement("button");y.style.width="18px";y.style.height="18px";y.style.marginLeft="6px";y.style.backgroundPosition="center center";y.style.backgroundRepeat="no-repeat";var D="#0000ff";f();mxEvent.addListener(y,"click",mxUtils.bind(this,function(a){this.pickColor(D||
"none",function(a){D=a;f()});mxEvent.consume(a)}));g.appendChild(y);mxUtils.br(g);c=null!=this.pages&&1<this.pages.length;var B=null;if(null==u||u.constructor!=DriveFile||b)B=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var C=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addCheckbox(g,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var G=this.addCheckbox(g,mxResources.get("layers"),!0);G.style.marginLeft=E.style.marginLeft;G.style.marginBottom="4px";mxEvent.addListener(C,
"change",function(){C.checked?(G.removeAttribute("disabled"),E.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(A.value,D,null==B?!0:B.checked,C.checked,E.checked,G.checked,null!=v?v.value:null,null!=z?z.value:null)}),null,mxResources.get("create"));this.showDialog(b.container,280,250+a,!0,!0);null!=v?(v.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():
document.execCommand("selectAll",!1,null)):A.focus()};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.padding="6px";var g=this.editor.graph;if(null!=b){var q=document.createElement("h3");mxUtils.write(q,b);q.style.marginTop="0px";q.style.marginBottom="8px";f.appendChild(q)}var u=this.addCheckbox(f,mxResources.get("fit"),!0),x=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),v=this.addCheckbox(f,c),z=this.addCheckbox(f,mxResources.get("lightbox"),
!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var y=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(f,mxResources.get("layers"),y,!y);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="8px";mxEvent.addListener(z,"change",function(){z.checked?(y&&D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(u.checked,
x.checked,v.checked,z.checked,A.checked,D.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,q){function u(b){var l=" ",q="";d&&(l=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
"function"===typeof window.OneDriveClient);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))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('\x3chtml\x3e\x3cimg src\x3d"data:'+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))+'"/\x3e\x3c/html\x3e'),f.document.close())}else f=
window.open("data:"+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());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(g){this.handleError(g)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),
mxResources.get("download"),!1,!1,f);this.showDialog(b.container,380,e?280:160,!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,e=!this.isOfflineApp()&&!this.isOffline()&&("function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||
"function"===typeof window.OneDriveClient);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())this.handleError({message:mxResources.get("errorSavingFile")});
else try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(g){this.handleError(g)}}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d);this.showDialog(a.container,380,e?280:160,!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){if(this.spinner.spin(document.body,mxResources.get("export"))){var q=this.editor.graph.isSelectionEmpty();c=null!=c?c:q;q=b?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&!1==b&&(q="#ffffff");var u=this.editor.graph.getSvg(q,a,null,g,null,c);d&&this.editor.addSvgShadow(u);a=this.getCurrentFile();var x=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=x.lastIndexOf(".");0<a&&(x=x.substring(0,a));var x=x+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();
e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(x,"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,u,!1,mxUtils.bind(this,function(){f?
(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(u,v,this.thumbImageCache)):v(u)}))}};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){function b(){null==
f||f==mxConstants.NONE?(e.style.backgroundColor="",e.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(e.style.backgroundColor=f,e.style.backgroundImage="")}mxUtils.write(a,mxResources.get("link")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="6px";c.style.marginRight="10px";c.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));c.appendChild(d);d=document.createElement("option");
d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));c.appendChild(d);a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var e=document.createElement("button");e.style.width="18px";e.style.height="18px";e.style.marginLeft="6px";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";var f="#0000ff";
b();mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(a)}));a.appendChild(e);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=document.createElement("div");d.style.padding="6px";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("export")+" "+mxResources.get("image"));e.style.marginTop=
"0px";e.style.marginBottom="8px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,140,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e){var f=this.editor.graph,g=document.createElement("div");g.style.paddingTop="10px";g.style.paddingRight=
"8px";var q=240,u=this.addCheckbox(g,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background),x=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");e&&(g.appendChild(v),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),q+=26);f.isSelectionEmpty()&&v.setAttribute("disabled","disabled");var z=this.addCheckbox(g,mxResources.get("shadow"),
f.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&A.setAttribute("disabled","disabled");a&&(g.appendChild(A),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),q+=26);var y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");y.style.marginBottom="8px";y.setAttribute("checked","checked");y.defaultChecked=
!0;g.appendChild(y);mxUtils.write(g,mxResources.get("includeCopyOfMyDiagram"));a=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,u.checked,!x.checked,z.checked,y.checked,A.checked,v.checked)}),mxResources.get("zoom")+" (%)",null,g,!this.isOffline()?c:null);this.showDialog(a.container,320,q,!0,!0);a.init()};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,q){var u=this.getCurrentFile(),x=[];d&&(x.push("chrome\x3d0"),x.push("lightbox\x3d1"),"auto"!=a&&x.push("target\x3d"+a),null!=
b&&b!=mxConstants.NONE&&x.push("highlight\x3d"+("#"==b.charAt(0)?b.substring(1):b)),e&&x.push("edit\x3d_blank"),f&&x.push("layers\x3d1"));null!=u&&null!=u.getTitle()&&x.push("title\x3d"+encodeURIComponent(u.getTitle()));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&x.push("page\x3d"+a);break}a="";null!=g?a="#U"+encodeURIComponent(g):(u=this.getCurrentFile(),a=!q&&null!=u&&u.constructor==DriveFile?"#"+u.getHash():"#R"+encodeURIComponent(c?
this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<x.length?"?"+x.join("\x26"):"")+a};EditorUi.prototype.showEmbedHtmlDialog=function(a,b){var c=document.createElement("div");c.style.padding="6px";c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("html"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
c.appendChild(d);d=document.createElement("div");d.style.cssText="border-bottom:1px solid lightGray;padding-bottom:6px;margin-bottom:8px;";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","type-embedhtmldialog");var f=e.cloneNode(!0);f.setAttribute("value","copy");d.appendChild(f);var g=document.createElement("span");mxUtils.write(g,mxResources.get("includeCopyOfMyDiagram"));
d.appendChild(g);mxUtils.br(d);d.appendChild(e);g=document.createElement("span");mxUtils.write(g,mxResources.get("publicDiagramUrl"));d.appendChild(g);var q=this.getCurrentFile();null==a&&null!=q&&q.constructor==DriveFile&&(g=document.createElement("a"),g.style.paddingLeft="12px",g.style.color="gray",g.setAttribute("href","javascript:void(0);"),mxUtils.write(g,mxResources.get("share")),d.appendChild(g),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(q.getId())})));
f.setAttribute("checked","checked");null==a&&e.setAttribute("disabled","disabled");c.appendChild(d);var u=this.addLinkSection(c),x=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="40px";v.style.marginLeft="6px";v.style.marginRight="12px";v.value="100%";c.appendChild(v);var z=this.addCheckbox(c,mxResources.get("fit"),!0),d=null!=this.pages&&1<this.pages.length,A=
A=this.addCheckbox(c,mxResources.get("allPages"),d,!d),y=this.addCheckbox(c,mxResources.get("layers"),!0),D=this.addCheckbox(c,mxResources.get("lightbox"),!0),B=this.addCheckbox(c,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";B.style.marginBottom="8px";mxEvent.addListener(D,"change",function(){D.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")});c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(e.checked?a:null,x.checked,v.value,u.getTarget(),u.getColor(),
z.checked,A.checked,y.checked,D.checked,B.checked)}),null,mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542-how-to-embed-html-");this.showDialog(c.container,320,360,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.padding="6px";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";f.appendChild(g);
var q=this.getCurrentFile();a=0;if(null!=q&&q.constructor==DriveFile&&!b){a=80;g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;padding-top:6px;margin-bottom:12px;text-align:center;";mxUtils.write(g,mxResources.get("linkAccountRequired"));mxUtils.br(g);var u=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(q.getId())}));u.style.marginTop="12px";u.className="geBtn";g.appendChild(u);f.appendChild(g);
u=document.createElement("a");u.style.paddingLeft="12px";u.style.color="gray";u.style.fontSize="11px";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("check"));g.appendChild(u);mxEvent.addListener(u,"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,340,80,!0,!1);a.init()}))}))}var x=null,v=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),x=document.createElement("input"),x.setAttribute("type","text"),x.style.marginRight="16px",x.style.width="50px",x.style.marginLeft="6px",x.style.marginRight="16px",x.style.marginBottom="10px",x.value="100%",f.appendChild(x),mxUtils.write(f,mxResources.get("height")+":"),v=document.createElement("input"),v.setAttribute("type","text"),
v.style.width="50px",v.style.marginLeft="6px",v.style.marginBottom="10px",v.value=d+"px",f.appendChild(v),mxUtils.br(f);var z=this.addLinkSection(f);c=null!=this.pages&&1<this.pages.length;var A=null;if(null==q||q.constructor!=DriveFile||b)A=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var y=this.addCheckbox(f,mxResources.get("lightbox"),!0),D=this.addCheckbox(f,mxResources.get("showEditButton"),!0);D.style.marginLeft="24px";var B=this.addCheckbox(f,mxResources.get("layers"),!0);B.style.marginLeft=
D.style.marginLeft;B.style.marginBottom="4px";mxEvent.addListener(y,"change",function(){y.checked?(B.removeAttribute("disabled"),D.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==A?!0:A.checked,y.checked,D.checked,B.checked,null!=x?x.value:null,null!=v?v.value:null)}),null,mxResources.get("create"));this.showDialog(b.container,280,240+a,!0,!0);null!=
x?(x.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)):z.focus()};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.padding="6px";var g=this.editor.graph;if(null!=b){var q=document.createElement("h3");mxUtils.write(q,b);q.style.marginTop="0px";q.style.marginBottom="8px";f.appendChild(q)}var u=this.addCheckbox(f,mxResources.get("fit"),!0),x=this.addCheckbox(f,mxResources.get("shadow"),
g.shadowVisible&&d,!d),v=this.addCheckbox(f,c),z=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var y=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(f,mxResources.get("layers"),y,!y);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="8px";mxEvent.addListener(z,"change",function(){z.checked?(y&&D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),
A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(u.checked,x.checked,v.checked,z.checked,A.checked,D.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,q){function u(b){var l=" ",q="";d&&(l=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");var u="";c&&(u=' width\x3d"'+Math.round(x.width)+'" height\x3d"'+Math.round(x.height)+'"');g('\x3cimg src\x3d"'+b+'"'+u+(""!=q?' style\x3d"'+q+'"':"")+l+"/\x3e")}var x=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createPngDataUri(a,b);u(a)}),null,null,null,mxUtils.bind(this,
function(a){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),x.width*x.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var v="";c&&(v="\x26w\x3d"+Math.round(2*x.width)+"\x26h\x3d"+Math.round(2*x.height));var z=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(d?"1":"0")+v+"\x26xml\x3d"+encodeURIComponent(b));z.send(mxUtils.bind(this,function(){200==z.getStatus()?u("data:image/png;base64,"+z.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var q=this.editor.graph.getSvg(),u=q.getElementsByTagName("a");if(null!=u)for(var x=0;x<u.length;x++){var v=u[x].getAttribute("href");null!=v&&"#"==v.charAt(0)&&"_blank"==u[x].getAttribute("target")&&u[x].removeAttribute("target")}d&&q.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(q);if(c){var z=" ",A="";d&&(z="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
@ -7672,10 +7670,10 @@ this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(
EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,u,x,v,z,A,y){f=null!=f?f:!0;z=null!=z?z:this.editor.graph;A=null!=A?A:0;var D=u?null:z.background;D==mxConstants.NONE&&(D=null);null==D&&(D=d);null==D&&!1==u&&(D="#ffffff");this.convertImages(z.getSvg(D,null,null,y,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")),m=parseInt(c.getAttribute("height"));q=null!=q?q:
1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));g=Math.ceil(q*g)+2*A;m=Math.ceil(q*m)+2*A;e.setAttribute("width",g);e.setAttribute("height",m);var n=e.getContext("2d");null!=D&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=D,n.fill());n.scale(q,q);n.drawImage(d,A/q,A/q);a(e)});d.onerror=function(a){null!=e&&e(a)};try{x&&this.editor.addSvgShadow(c),this.convertMath(z,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};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?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));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 m=a.getElementsByTagName(c),
x=0;x<m.length;x++)mxUtils.bind(this,function(c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var t=f[m];null==t?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,t)}})(m[x])});c("image","xlink:href");c("img","src");0==e&&b(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()});
x=0;x<m.length;x++)mxUtils.bind(this,function(c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var u=f[m];null==u?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,u)}})(m[x])});c("image","xlink:href");c("img","src");0==e&&b(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 q=mxUtils.parseXml(a),u=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=u&&"mxfile"==u.nodeName&&null!=this.pages){var x=u.getElementsByTagName("diagram");
if(1==x.length)u=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(x[0]))).documentElement;else if(1<x.length){g.model.beginUpdate();try{for(var v=0;v<x.length;v++){var z=this.updatePageRoot(new DiagramPage(x[v])),A=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,z,z,A))}}finally{g.model.endUpdate()}}}if(null!=u&&"mxGraphModel"===u.nodeName){var y=new mxGraphModel;(new mxCodec(u.ownerDocument)).decode(u,y);var D=y.getChildCount(y.getRoot());
g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<D;v++){var B=y.getChildAt(y.getRoot(),v);if(1==D&&!g.isCellLocked(g.getDefaultParent()))var C=y.getChildren(B),f=f.concat(g.importCells(C,b,c,g.getDefaultParent(),null,a));else B=g.importCells([B],0,0,g.model.getRoot(),null,a)[0],C=g.model.getChildren(B),g.moveCells(C,b,c),f=f.concat(C)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var E=g.getBoundingBoxFromGeometry(f,!0);null!=E&&g.moveCells(f,b-E.x,c-E.y)}}finally{g.model.endUpdate()}}}}catch(G){throw e||
g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<D;v++){var B=y.getChildAt(y.getRoot(),v);if(1==D&&!g.isCellLocked(g.getDefaultParent()))var C=y.getChildren(B),f=f.concat(g.importCells(C,b,c,g.getDefaultParent(),null,a));else B=g.importCells([B],0,0,g.model.getRoot(),null,a)[0],C=g.model.getChildren(B),g.moveCells(C,b,c),f=f.concat(C)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var F=g.getBoundingBoxFromGeometry(f,!0);null!=F&&g.moveCells(f,b-F.x,c-F.y)}}finally{g.model.endUpdate()}}}}catch(G){throw e||
this.handleError(G,mxResources.get("invalidOrMissingFile")),G;}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(e){}});!this.pasteLucidChart&&!this.loadingExtensions&&!this.isOffline()?(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("/js/diagramly/Extensions.js",e):mxscript("/js/extensions.min.js",e)):window.setTimeout(e,0)};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&&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 q=this.extractGraphModelFromPng(a),u=this.importXml(q,b,c,f,!0);if(0<u.length)return u}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),u=this.importXml(q,b,c,f,!0),0<u.length)return u}catch(x){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,
@ -7689,10 +7687,10 @@ a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileForma
a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";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+="\x3d";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,q,u,x,v,z){var A=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 y=this.editor.graph,D=y.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,A,z)});f=null!=f?f:mxUtils.bind(this,function(a){y.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var B=
a.length,C=B,E=[],G=mxUtils.bind(this,function(a,b){E[a]=b;if(0==--C){this.spinner.stop();if(null!=q)q(E);else{var c=[];y.getModel().beginUpdate();try{for(var d=0;d<E.length;d++){var e=E[d]();null!=e&&(c=c.concat(e))}}finally{y.getModel().endUpdate()}}f(c)}}),I=0;I<B;I++)mxUtils.bind(this,function(f){var q=a[f],s=new FileReader;s.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,s=k.indexOf(","),y=
a.length,C=B,F=[],G=mxUtils.bind(this,function(a,b){F[a]=b;if(0==--C){this.spinner.stop();if(null!=q)q(F);else{var c=[];y.getModel().beginUpdate();try{for(var d=0;d<F.length;d++){var e=F[d]();null!=e&&(c=c.concat(e))}}finally{y.getModel().endUpdate()}}f(c)}}),I=0;I<B;I++)mxUtils.bind(this,function(f){var q=a[f],s=new FileReader;s.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,s=k.indexOf(","),y=
atob(k.substring(s+1)),A=mxUtils.parseXml(y),y=A.getElementsByTagName("svg");if(0<y.length){var y=y[0],B=z?null:y.getAttribute("content");null!=B&&"\x3c"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null!=B&&("\x3cmxfile "===B.substring(0,8)||"\x3cmxGraphModel "===B.substring(0,14))?G(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*D,c+f*D,0,0,q.name)})):G(f,mxUtils.bind(this,function(){try{if(k.substring(0,
s+1),null!=A){var a=A.getElementsByTagName("svg");if(0<a.length){var g=a[0],u=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),x=g.getAttribute("viewBox");if(null==x||0==x.length)g.setAttribute("viewBox","0 0 "+u+" "+t);else if(isNaN(u)||isNaN(t)){var v=x.split(" ");3<v.length&&(u=parseFloat(v[2]),t=parseFloat(v[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var y=Math.min(1,Math.min(d/Math.max(1,u)),d/Math.max(1,t));return e(k,q.type,b+f*D,c+f*D,Math.max(1,Math.round(u*
y)),Math.max(1,Math.round(t*y)),q.name)}}}catch(z){}return null}))}}else{y=!1;if("image/png"==q.type){var C=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var E=new Image;E.src=a.target.result;G(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*D,c+f*D,E.width,E.height,q.name)}));y=!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
y)),Math.max(1,Math.round(t*y)),q.name)}}}catch(z){}return null}))}}else{y=!1;if("image/png"==q.type){var C=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var F=new Image;F.src=a.target.result;G(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*D,c+f*D,F.width,F.height,q.name)}));y=!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(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,k,s){G(f,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var t=!u||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/s));return e(g,q.type,b+f*D,c+f*D,Math.round(k*t),Math.round(s*t),q.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),u,d,v)})))}else e(a.target.result,q.type,b+f*D,c+f*D,240,160,q.name,function(a){G(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*D,c+f*D,240,160,q.name,function(a){G(f,function(){return a})},q):"image"==q.type.substring(0,5)?s.readAsDataURL(q):s.readAsText(q)})(I)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var u=Math.max(g/e,q/e);if(1<u){var x=Math.round(g/u),v=Math.round(q/u),z=document.createElement("canvas");z.width=x;z.height=v;z.getContext("2d").drawImage(a,0,0,x,v);var A=z.toDataURL();if(A.length<b.length){var y=
@ -7742,7 +7740,7 @@ s.action){z=null;z="data:image/png;base64,"==s.xml.substring(0,22)?this.extractG
mxResources.get(s.discardKey):null);this.showDialog(z.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{z.init()}catch(A){g.postMessage(JSON.stringify({event:"draft",error:A.toString(),message:s}),"*")}return}if("template"==s.action){z=new NewDialog(this,!1,null!=s.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=s.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(z.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));z.init();return}if("status"==s.action){null!=s.messageKey?this.editor.setStatus(mxResources.get(s.messageKey)):null!=s.message&&this.editor.setStatus(s.message);null!=s.modified&&(this.editor.modified=s.modified);return}if("spinner"==s.action){var y=null!=s.messageKey?mxResources.get(s.messageKey):s.message;null!=
s.show&&!s.show?this.spinner.stop():this.spinner.spin(document.body,y);return}if("export"==s.action){if("png"==s.format||"xmlpng"==s.format){if(null==s.spin&&null==s.spinKey||this.spinner.spin(document.body,null!=s.spinKey?mxResources.get(s.spinKey):s.spin)){var D=null!=s.xml?s.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var B=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=s.format;b.xml=encodeURIComponent(D);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),
"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var C=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var C=this.createTemporaryGraph(C.getStylesheet()),E=C.getGlobalVariable,G=this.pages[0];C.getGlobalVariable=function(a){return"page"==a?G.getName():"pagenumber"==a?1:E.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(G.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==s.format&&(a=
"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var C=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var C=this.createTemporaryGraph(C.getStylesheet()),F=C.getGlobalVariable,G=this.pages[0];C.getGlobalVariable=function(a){return"page"==a?G.getName():"pagenumber"==a?1:F.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(G.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==s.format&&(a=
this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(D))));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);B(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==s.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(D)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();
200==a.getStatus()&&B(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=s.xml&&0<s.xml.length&&this.setFileData(s.xml);y=this.createLoadMessage("export");if("html2"==s.format||"html"==s.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))z=this.getXmlFileData(),y.xml=mxUtils.getXml(z),y.data=this.getFileData(null,null,!0,null,null,null,z),y.format=s.format;else if("html"==s.format)D=this.editor.getGraphXml(),y.data=this.getHtml(D,this.editor.graph),y.xml=
mxUtils.getXml(D),y.format=s.format;else{mxSvgCanvas2D.prototype.foAltText=null;z=this.editor.graph.background;z==mxConstants.NONE&&(z=null);y.xml=this.getFileData(!0);y.format="svg";if(s.embedImages||null==s.embedImages){if(null==s.spin&&null==s.spinKey||this.spinner.spin(document.body,null!=s.spinKey?mxResources.get(s.spinKey):s.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==s.format?this.getEmbeddedSvg(y.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
@ -7755,11 +7753,11 @@ urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButton
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="auto",g="auto",q=40,u=40,x=0,v=this.editor.graph;v.getGraphBounds();
for(var z=function(){v.setSelectionCells(Z);v.scrollCellToVisible(v.getSelectionCell())},A=v.getFreeInsertPoint(),y=A.x,D=A.y,A=D,B=null,C="auto",E=[],G=null,I=null,H=0;H<b.length&&"#"==b[H].charAt(0);){a=b[H];for(H++;H<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[H].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[H].substring(1)),H++;if("#"!=a.charAt(1)){var K=a.indexOf(":");if(0<K){var L=mxUtils.trim(a.substring(1,K)),P=mxUtils.trim(a.substring(K+1));"label"==L?B=v.sanitizeHtml(P):"style"==
L?e=P:"width"==L?f=P:"height"==L?g=P:"ignore"==L?I=P.split(","):"connect"==L?E.push(JSON.parse(P)):"link"==L?G=P:"padding"==L?x=parseFloat(P):"edgespacing"==L?q=parseFloat(P):"nodespacing"==L?u=parseFloat(P):"layout"==L&&(C=P)}}}var W=this.editor.csvToArray(b[H]);null==B&&(B="%"+W[0]+"%");if(null!=E)for(var V=0;V<E.length;V++)null==d[E[V].to]&&(d[E[V].to]={});v.model.beginUpdate();try{for(a=H+1;a<b.length;a++){var Q=this.editor.csvToArray(b[a]);if(Q.length==W.length){var F=new mxCell(B,new mxGeometry(y,
A,0,0),e||"whiteSpace\x3dwrap;html\x3d1;");F.vertex=!0;for(var S=0;S<Q.length;S++)v.setAttributeForCell(F,W[S],Q[S]);v.setAttributeForCell(F,"placeholders","1");F.style=v.replacePlaceholders(F,F.style);for(V=0;V<E.length;V++)d[E[V].to][F.getAttribute(E[V].to)]=F;null!=G&&"link"!=G&&(v.setLinkForCell(F,F.getAttribute(G)),v.setAttributeForCell(F,G,null));if(null!=I)for(S=0;S<I.length;S++)v.setAttributeForCell(F,mxUtils.trim(I[S]),null);var O=this.editor.graph.getPreferredSizeForCell(F);F.geometry.width=
"auto"==f?O.width+x:parseFloat(f);F.geometry.height="auto"==g?O.height+x:parseFloat(g);A+=F.geometry.height+u;c.push(v.addCell(F))}}null==e&&v.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var M=c.slice(),Z=c.slice(),V=0;V<E.length;V++){var N=E[V];for(a=0;a<c.length;a++){var F=c[a],J=F.getAttribute(N.from);if(null!=J){v.setAttributeForCell(F,N.from,null);for(var R=J.split(","),S=0;S<R.length;S++){var X=d[N.to][R[S]];null!=X&&(Z.push(v.insertEdge(null,null,N.label||"",N.invert?X:F,N.invert?
F:X,N.style||v.createCurrentEdgeStyle())),mxUtils.remove(N.invert?F:X,M))}}}}var ea=new mxParallelEdgeLayout(v);ea.spacing=q;var da=function(){ea.execute(v.getDefaultParent());for(var a=0;a<c.length;a++){var b=v.getCellGeometry(c[a]);b.x=Math.round(v.snap(b.x));b.y=Math.round(v.snap(b.y));"auto"==f&&(b.width=Math.round(v.snap(b.width)));"auto"==g&&(b.height=Math.round(v.snap(b.height)))}};if("circle"==C){var U=new mxCircleLayout(v);U.resetEdges=!1;var aa=U.isVertexIgnored;U.isVertexIgnored=function(a){return aa.apply(this,
for(var z=function(){v.setSelectionCells(Z);v.scrollCellToVisible(v.getSelectionCell())},A=v.getFreeInsertPoint(),y=A.x,D=A.y,A=D,B=null,C="auto",F=[],G=null,I=null,H=0;H<b.length&&"#"==b[H].charAt(0);){a=b[H];for(H++;H<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[H].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[H].substring(1)),H++;if("#"!=a.charAt(1)){var K=a.indexOf(":");if(0<K){var L=mxUtils.trim(a.substring(1,K)),P=mxUtils.trim(a.substring(K+1));"label"==L?B=v.sanitizeHtml(P):"style"==
L?e=P:"width"==L?f=P:"height"==L?g=P:"ignore"==L?I=P.split(","):"connect"==L?F.push(JSON.parse(P)):"link"==L?G=P:"padding"==L?x=parseFloat(P):"edgespacing"==L?q=parseFloat(P):"nodespacing"==L?u=parseFloat(P):"layout"==L&&(C=P)}}}var W=this.editor.csvToArray(b[H]);null==B&&(B="%"+W[0]+"%");if(null!=F)for(var V=0;V<F.length;V++)null==d[F[V].to]&&(d[F[V].to]={});v.model.beginUpdate();try{for(a=H+1;a<b.length;a++){var Q=this.editor.csvToArray(b[a]);if(Q.length==W.length){var E=new mxCell(B,new mxGeometry(y,
A,0,0),e||"whiteSpace\x3dwrap;html\x3d1;");E.vertex=!0;for(var S=0;S<Q.length;S++)v.setAttributeForCell(E,W[S],Q[S]);v.setAttributeForCell(E,"placeholders","1");E.style=v.replacePlaceholders(E,E.style);for(V=0;V<F.length;V++)d[F[V].to][E.getAttribute(F[V].to)]=E;null!=G&&"link"!=G&&(v.setLinkForCell(E,E.getAttribute(G)),v.setAttributeForCell(E,G,null));if(null!=I)for(S=0;S<I.length;S++)v.setAttributeForCell(E,mxUtils.trim(I[S]),null);var O=this.editor.graph.getPreferredSizeForCell(E);E.geometry.width=
"auto"==f?O.width+x:parseFloat(f);E.geometry.height="auto"==g?O.height+x:parseFloat(g);A+=E.geometry.height+u;c.push(v.addCell(E))}}null==e&&v.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var M=c.slice(),Z=c.slice(),V=0;V<F.length;V++){var N=F[V];for(a=0;a<c.length;a++){var E=c[a],J=E.getAttribute(N.from);if(null!=J){v.setAttributeForCell(E,N.from,null);for(var R=J.split(","),S=0;S<R.length;S++){var X=d[N.to][R[S]];null!=X&&(Z.push(v.insertEdge(null,null,N.label||"",N.invert?X:E,N.invert?
E:X,N.style||v.createCurrentEdgeStyle())),mxUtils.remove(N.invert?E:X,M))}}}}var ea=new mxParallelEdgeLayout(v);ea.spacing=q;var da=function(){ea.execute(v.getDefaultParent());for(var a=0;a<c.length;a++){var b=v.getCellGeometry(c[a]);b.x=Math.round(v.snap(b.x));b.y=Math.round(v.snap(b.y));"auto"==f&&(b.width=Math.round(v.snap(b.width)));"auto"==g&&(b.height=Math.round(v.snap(b.height)))}};if("circle"==C){var U=new mxCircleLayout(v);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(v.getDefaultParent());da()},!0,z);z=null}else if("horizontaltree"==C||"verticaltree"==C||"auto"==C&&Z.length==2*c.length-1&&1==M.length){v.view.validate();var ba=new mxCompactTreeLayout(v,"horizontaltree"==C);ba.levelDistance=u;ba.edgeRouting=!1;this.executeLayout(function(){ba.execute(v.getDefaultParent(),0<M.length?M[0]:null)},!0,z);z=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==M.length){v.view.validate();
var Y=new mxHierarchicalLayout(v,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Y.intraCellSpacing=u;this.executeLayout(function(){Y.execute(v.getDefaultParent(),Z);v.moveCells(Z,y,D)},!0,z);z=null}else if("organic"==C||"auto"==C&&Z.length>c.length){v.view.validate();var T=new mxFastOrganicLayout(v);T.forceConstant=3*u;T.resetEdges=!1;var ja=T.isVertexIgnored;T.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ea=new mxParallelEdgeLayout(v);
ea.spacing=q;this.executeLayout(function(){T.execute(v.getDefaultParent());da()},!0,z);z=null}this.hideDialog()}finally{v.model.endUpdate()}null!=z&&z()}}catch(fa){this.handleError(fa)}};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+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl=
@ -7791,11 +7789,12 @@ App=function(a,c,f){EditorUi.call(this,a,c,null!=f?f:"1"==urlParams.lightbox);mx
App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.DROPBOX_APPKEY="libwls2fa9szdji";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js"};
App.getStoredMode=function(){var a=null;if("undefined"!=typeof Storage)for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE\x3d"==d.substring(0,5)){a=d.substring(5);break}}return a};
(function(){if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"==urlParams.chrome&&(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,2)?mxscript("https://www.dropbox.com/static/api/1/dropins.js",null,"dropboxjs",App.DROPBOX_APPKEY):"0"==urlParams.chrome&&
(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),
"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0<a.length)App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)};if(null!=c)for(var f=c.split(";"),c=0;c<f.length;c++){var d=App.pluginRegistry[f[c]];null!=d?mxscript(d):null!=window.console&&console.log("Unknown plugin:",f[c])}if(null!=a&&0<a.length&&"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;d=!0;for(c=0;c<a.length&&
d;c++)"/"!=a[c].charAt(0)&&a[c].substring(0,f.length)!=f&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("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",[a.join("\n")]).replace(/\\n/g,"\n")))for(c=0;c<a.length;c++)try{mxscript(a[c])}catch(b){}}}})();
(function(){if(!mxClient.IS_CHROMEAPP){"1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode()));if(null!=window.mxscript){if("1"!=urlParams.embed){if("function"===typeof window.DriveClient)if("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode))if(App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2))mxscript("https://apis.google.com/js/api.js");else{if("0"==urlParams.chrome&&(null==window.location.hash||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"!==window.location.hash.substring(0,45)))window.DriveClient=null}else window.DriveClient=null;"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?mxscript("https://www.dropbox.com/static/api/1/dropins.js",null,"dropboxjs",App.DROPBOX_APPKEY):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null);"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==
urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=null)}"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0<a.length)App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)};if(null!=c)for(var f=c.split(";"),c=0;c<f.length;c++){var d=App.pluginRegistry[f[c]];null!=d?mxscript(d):null!=window.console&&console.log("Unknown plugin:",
f[c])}if(null!=a&&0<a.length&&"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;d=!0;for(c=0;c<a.length&&d;c++)"/"!=a[c].charAt(0)&&a[c].substring(0,f.length)!=f&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("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",[a.join("\n")]).replace(/\\n/g,
"\n")))for(c=0;c<a.length;c++)try{mxscript(a[c])}catch(b){}}}}})();
App.main=function(a){var c=null;window.onerror=function(a,b,e,f,k){try{if(!(a==c||null!=a&&null!=b&&(-1!=a.indexOf("Script error")||-1!=a.indexOf("extension")))&&null!=a&&0>a.indexOf("DocumentClosedError")){c=a;var l=new Image,m=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";l.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3d"+m+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+
"\x26msg\x3dclientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"\x26stack\x3d"+encodeURIComponent(k.stack):"")}}catch(n){}};"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var f=document.createElement("iframe");
f.setAttribute("width","0");f.setAttribute("height","0");f.setAttribute("src","offline.html");document.body.appendChild(f);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(a){return mxStencilRegistry.stencils[a]};mxStencilRegistry.loadStencilSet=function(a,b,c){a=a.substring(a.indexOf("/")+1);a="mxgraph."+a.substring(0,a.length-4).replace(/\//g,".");a=mxStencilRegistry.stencilSet[a];null!=a&&mxStencilRegistry.parseStencilSet(a,b,!1)};for(f=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=
@ -7891,10 +7890,10 @@ mxUtils.bind(this,function(a){g();this.handleError(a)}))}};
App.prototype.loadFile=function(a,c,f){this.hideDialog();f=mxUtils.bind(this,function(){if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var d=localStorage.getItem(a);if(null!=d)this.fileLoaded(new StorageFile(this,d,a));else throw{message:mxResources.get("fileNotFound")};}catch(b){this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=e)this.spinner.stop(),this.fileLoaded(e);else if("R"==a.charAt(0)){this.spinner.stop();d=decodeURIComponent(a.substring(1));"\x3c"!=d.charAt(0)&&(d=this.editor.graph.decompress(d));var e=new LocalFile(this,d,null!=urlParams.title?
decodeURIComponent(urlParams.title):this.defaultFilename);e.getHash=function(){return a};this.fileLoaded(e);this.setMode(null)}else if("U"==a.charAt(0)){var f=decodeURIComponent(a.substring(1));this.loadTemplate(f,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=f,n=f.lastIndexOf("."),p=e.lastIndexOf("/");if(n>p&&0<p&&(e=e.substring(p+1,n),n=f.substring(n),".png"==n&&(n=".xml"),".svg"===n||
".xml"===n||".html"===n))d=e+n}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):d);b.getHash=function(){return a};this.fileLoaded(b)?this.setMode(null):"https://drive.google.com/uc?id\x3d"==f.substring(0,31)&&(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+f.substring(31,f.lastIndexOf("\x26")),c),!0):!1}),!b()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",
b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else d=null,"G"==a.charAt(0)?d=this.drive:"D"==a.charAt(0)?d=this.dropbox:"W"==a.charAt(0)&&(d=this.oneDrive),null==d?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),
d.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))});null==a||0==a.length?(this.editor.setStatus(""),this.fileLoaded(null)):null!=this.getCurrentFile()&&
!this.isDiagramEmpty()&&!c?window.openWindow(this.getUrl()+"#"+a,null,f):f()};
".xml"===n||".html"===n))d=e+n}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):d);b.getHash=function(){return a};this.fileLoaded(b)?this.setMode(null):"https://drive.google.com/uc?id\x3d"==f.substring(0,31)&&(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+f.substring(31,f.lastIndexOf("\x26")),c),!0):!1}),!b()&&"function"===typeof window.DriveClient&&this.spinner.spin(document.body,mxResources.get("loading"))&&
this.addListener("clientLoaded",b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else d=null,"G"==a.charAt(0)?d=this.drive:"D"==a.charAt(0)?d=this.dropbox:"W"==a.charAt(0)&&(d=this.oneDrive),null==d?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?
a.getHash():""})):(a=decodeURIComponent(a.substring(1)),d.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))});null==a||0==a.length?(this.editor.setStatus(""),
this.fileLoaded(null)):null!=this.getCurrentFile()&&!this.isDiagramEmpty()&&!c?window.openWindow(this.getUrl()+"#"+a,null,f):f()};
App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(c){if(null!=c)for(var d=0;d<c.length;d++){var b=encodeURIComponent(decodeURIComponent(c[d]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0,
1);if("L"==c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(f){a(b)}}else if("U"==c){var m=decodeURIComponent(b.substring(1));this.isOffline()||mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(m),mxUtils.bind(this,function(c){if(200==c.getStatus())try{this.loadLibrary(new UrlLibrary(this,
@ -8245,7 +8244,7 @@ Image_iphone_add_icon_green:"shape\x3dmxgraph.ios.iAddIcon;fillColor\x3d#7AdF78;
Image_iphone_location_dot:"shape\x3dellipse;",Image_iphone_mark_as_read:"shape\x3dellipse;",Image_iphone_pin_green:"shape\x3dmxgraph.ios.iPin;fillColor2\x3d#00dd00;fillColor3\x3d#004400;strokeColor\x3d#006600;",Image_iphone_pin_red:"shape\x3dmxgraph.ios.iPin;fillColor2\x3d#dd0000;fillColor3\x3d#440000;strokeColor\x3d#660000;",Image_iphone_radio_off:"shape\x3dellipse;",Image_iphone_checkbox_off:"shape\x3drect;rounded\x3d1;",Image_iphone_indicator:"shape\x3drect;rounded\x3d1;fillColor\x3d#e8878E;gradientColor\x3d#BD1421;strokeColor\x3d#ffffff;",
Image_iphone_thread_count:"shape\x3drect;rounded\x3d1;"};EditorUi.prototype.pasteLucidChart=function(b,e,k,l){var m=this.editor.graph;m.getModel().beginUpdate();try{var n=[],p={},A=[];if(null!=b.Blocks)for(var y in b.Blocks){var D=b.Blocks[y];D.id=y;p[D.id]=d(D);A.push(D)}else for(var B=0;B<b.Objects.length;B++)D=b.Objects[B],D.IsBlock&&null!=D.Action&&null!=D.Action.Properties&&(p[D.id]=d(D)),A.push(D);A.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(var C=function(b,d){var l=null!=d.Endpoint1.Block?p[d.Endpoint1.Block]:null,s=null!=d.Endpoint2.Block?p[d.Endpoint2.Block]:null,u=new mxCell("",new mxGeometry(0,0,100,100),"html\x3d1;");u.geometry.relative=!0;u.edge=!0;f(u,b);var y=c(b).Properties,y=null!=y?y.TextAreas:b.TextAreas;if(null!=y)for(var A=0;null!=y["t"+A];){var y=y["t"+A],B=2*(parseFloat(y.Location)-0.5),B=new mxCell(a(y),new mxGeometry(B,0,0,0),"text;html\x3d1;resizable\x3d0;align\x3dcenter;verticalAlign\x3dmiddle;labelBackgroundColor\x3d#ffffff;");
B.geometry.relative=!0;B.vertex=!0;u.insert(B);A++}null==l&&null!=d.Endpoint1&&u.geometry.setTerminalPoint(new mxPoint(Math.round(d.Endpoint1.x*g+e),Math.round(d.Endpoint1.y*g+k)),!0);null==s&&null!=d.Endpoint2&&u.geometry.setTerminalPoint(new mxPoint(Math.round(d.Endpoint2.x*g+e),Math.round(d.Endpoint2.y*g+k)),!1);n.push(m.addCell(u,null,null,l,s))},B=0;B<A.length;B++){var D=A[B],E=p[D.id];null!=E?n.push(m.addCell(E)):D.IsLine&&null!=D.Action&&null!=D.Action.Properties&&C(D,D.Action.Properties)}if(null!=
B.geometry.relative=!0;B.vertex=!0;u.insert(B);A++}null==l&&null!=d.Endpoint1&&u.geometry.setTerminalPoint(new mxPoint(Math.round(d.Endpoint1.x*g+e),Math.round(d.Endpoint1.y*g+k)),!0);null==s&&null!=d.Endpoint2&&u.geometry.setTerminalPoint(new mxPoint(Math.round(d.Endpoint2.x*g+e),Math.round(d.Endpoint2.y*g+k)),!1);n.push(m.addCell(u,null,null,l,s))},B=0;B<A.length;B++){var D=A[B],F=p[D.id];null!=F?n.push(m.addCell(F)):D.IsLine&&null!=D.Action&&null!=D.Action.Properties&&C(D,D.Action.Properties)}if(null!=
b.Lines)for(y in b.Lines)D=b.Lines[y],C(D,D);if(l&&null!=e&&null!=k){m.isGridEnabled()&&(e=m.snap(e),k=m.snap(k));var G=m.getBoundingBoxFromGeometry(n,!0);null!=G&&m.moveCells(n,e-G.x,k-G.y)}m.setSelectionCells(n)}finally{m.getModel().endUpdate()}m.isSelectionEmpty()||(m.scrollCellToVisible(m.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(m.view.getState(m.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?a=d.language:null!=g&&null!=urlParams.loc&&(a=urlParams.loc,d=a.indexOf("-"),0<=d&&(a=a.substring(0,d)));"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={};

View file

@ -227,7 +227,9 @@ App.getStoredMode = function()
{
mxscript('https://apis.google.com/js/api.js');
}
else if (urlParams['chrome'] == '0')
// Keeps lazy loading for fallback to authenticated Google file if not public in loadFile
else if (urlParams['chrome'] == '0' && (window.location.hash == null ||
window.location.hash.substring(0, 45) !== '#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D'))
{
// Disables loading of client
window.DriveClient = null;
@ -3229,7 +3231,8 @@ App.prototype.loadFile = function(id, sameWindow, file)
}
});
if (!fallback() && this.spinner.spin(document.body, mxResources.get('loading')))
if (!fallback() && typeof window.DriveClient === 'function' &&
this.spinner.spin(document.body, mxResources.get('loading')))
{
this.addListener('clientLoaded', fallback);
}

View file

@ -2575,37 +2575,52 @@
// Opens a new window
if (mode == '_blank')
{
// Workaround for "Access denied" after URL.createObjectURL
// and blank window for window.open with data URI in MS Edge
// and empty window for IE 11 and 10
var win = window.open('about:blank');
if (win == null)
{
mxUtils.popup(data, true);
}
else if (mimeType != null && mimeType.substring(0, 6) == 'image/' &&
(mimeType.substring(0, 9) != 'image/svg' || mxClient.IS_SVG))
if (mimeType != null && mimeType.substring(0, 6) == 'image/' &&
(mimeType.substring(0, 9) != 'image/svg' || mxClient.IS_SVG))
{
if (mxClient.IS_EDGE || document.documentMode == 11 || document.documentMode == 10)
{
win.document.write('<html><img src="data:' +
mimeType + ((base64Encoded) ? ';base64,' +
data : ';charset=utf8,' + encodeURIComponent(data)) +
'"/></html>');
win.document.close();
var win = window.open('about:blank');
if (win == null)
{
mxUtils.popup(data, true);
}
else
{
win.document.write('<html><img src="data:' +
mimeType + ((base64Encoded) ? ';base64,' +
data : ';charset=utf8,' + encodeURIComponent(data)) +
'"/></html>');
win.document.close();
}
}
else
{
// Enables page refresh and drag and drop of URL
win.location.replace('data:' + mimeType + ((base64Encoded) ? ';base64,' +
data : ';charset=utf8,' + encodeURIComponent(data)));
// win.open is workaround for cleared contents in Chrome after delay
// when using location.replace
var win = window.open('data:' + mimeType + ((base64Encoded) ? ';base64,' +
data : ';charset=utf8,' + encodeURIComponent(data)));
if (win == null)
{
mxUtils.popup(data, true);
}
}
}
else
{
win.document.write(mxUtils.htmlEntities(data, false));
win.document.close();
var win = window.open('about:blank');
if (win == null)
{
mxUtils.popup(data, true);
}
else
{
win.document.write(mxUtils.htmlEntities(data, false));
win.document.close();
}
}
}
else if (mode == App.MODE_DEVICE)
@ -2861,6 +2876,93 @@
return cb;
};
/**
*
*/
EditorUi.prototype.addLinkSection = function(div)
{
mxUtils.write(div, mxResources.get('link') + ':');
var linkSelect = document.createElement('select');
linkSelect.style.width = '100px';
linkSelect.style.marginLeft = '6px';
linkSelect.style.marginRight = '10px';
linkSelect.className = 'geBtn';
var autoOption = document.createElement('option');
autoOption.setAttribute('value', 'auto');
mxUtils.write(autoOption, mxResources.get('automatic'));
linkSelect.appendChild(autoOption);
var blankOption = document.createElement('option');
blankOption.setAttribute('value', 'blank');
mxUtils.write(blankOption, mxResources.get('openInNewWindow'));
linkSelect.appendChild(blankOption);
var selfOption = document.createElement('option');
selfOption.setAttribute('value', 'self');
mxUtils.write(selfOption, mxResources.get('openInThisWindow'));
linkSelect.appendChild(selfOption);
div.appendChild(linkSelect);
mxUtils.write(div, mxResources.get('borderColor') + ':');
var linkButton = document.createElement('button');
linkButton.style.width = '18px';
linkButton.style.height = '18px';
linkButton.style.marginLeft = '6px';
linkButton.style.backgroundPosition = 'center center';
linkButton.style.backgroundRepeat = 'no-repeat';
var linkColor = '#0000ff';
function updateLinkColor()
{
if (linkColor == null || linkColor == mxConstants.NONE)
{
linkButton.style.backgroundColor = '';
linkButton.style.backgroundImage = 'url(\'' + Dialog.prototype.noColorImage + '\')';
}
else
{
linkButton.style.backgroundColor = linkColor;
linkButton.style.backgroundImage = '';
}
};
updateLinkColor();
mxEvent.addListener(linkButton, 'click', mxUtils.bind(this, function(evt)
{
this.pickColor(linkColor || 'none', function(color)
{
linkColor = color;
updateLinkColor();
});
mxEvent.consume(evt);
}));
div.appendChild(linkButton);
mxUtils.br(div);
return {
getColor: function()
{
return linkColor;
},
getTarget: function()
{
return linkSelect.value;
},
focus: function()
{
linkSelect.focus();
}
};
}
/**
*
@ -2981,7 +3083,7 @@
params.push('target=' + linkTarget);
}
if (linkColor != null)
if (linkColor != null && linkColor != mxConstants.NONE)
{
params.push('highlight=' + ((linkColor.charAt(0) == '#') ? linkColor.substring(1) : linkColor));
}
@ -3078,7 +3180,6 @@
radioSection.appendChild(span);
mxUtils.br(radioSection);
radioSection.appendChild(publicUrlRadio);
var span = document.createElement('span');
@ -3089,15 +3190,18 @@
if (publicUrl == null && file != null && file.constructor == DriveFile)
{
var shareBtn = mxUtils.button(mxResources.get('share'), mxUtils.bind(this, function()
var testLink = document.createElement('a');
testLink.style.paddingLeft = '12px';
testLink.style.color = 'gray';
testLink.setAttribute('href', 'javascript:void(0);');
mxUtils.write(testLink, mxResources.get('share'));
radioSection.appendChild(testLink);
mxEvent.addListener(testLink, 'click', mxUtils.bind(this, function()
{
this.hideDialog();
this.drive.showPermissions(file.getId());
}));
shareBtn.style.marginTop = '12px';
shareBtn.style.marginLeft = '8px';
shareBtn.className = 'geBtn';
radioSection.appendChild(shareBtn);
}
copyRadio.setAttribute('checked', 'checked');
@ -3108,73 +3212,8 @@
}
div.appendChild(radioSection);
mxUtils.write(div, mxResources.get('link') + ':');
var linkSelect = document.createElement('select');
linkSelect.style.width = '100px';
linkSelect.style.marginLeft = '6px';
linkSelect.style.marginRight = '10px';
linkSelect.className = 'geBtn';
var autoOption = document.createElement('option');
autoOption.setAttribute('value', 'auto');
mxUtils.write(autoOption, mxResources.get('automatic'));
linkSelect.appendChild(autoOption);
var blankOption = document.createElement('option');
blankOption.setAttribute('value', 'blank');
mxUtils.write(blankOption, mxResources.get('openInNewWindow'));
linkSelect.appendChild(blankOption);
var selfOption = document.createElement('option');
selfOption.setAttribute('value', 'self');
mxUtils.write(selfOption, mxResources.get('openInThisWindow'));
linkSelect.appendChild(selfOption);
div.appendChild(linkSelect);
mxUtils.write(div, mxResources.get('borderColor') + ':');
var linkButton = document.createElement('button');
linkButton.style.width = '18px';
linkButton.style.height = '18px';
linkButton.style.marginLeft = '6px';
linkButton.style.backgroundPosition = 'center center';
linkButton.style.backgroundRepeat = 'no-repeat';
var linkColor = '#0000ff';
function updateLinkColor()
{
if (linkColor == null || linkColor == mxConstants.NONE)
{
linkButton.style.backgroundColor = '';
linkButton.style.backgroundImage = 'url(\'' + Dialog.prototype.noColorImage + '\')';
}
else
{
linkButton.style.backgroundColor = linkColor;
linkButton.style.backgroundImage = '';
}
};
updateLinkColor();
mxEvent.addListener(linkButton, 'click', mxUtils.bind(this, function(evt)
{
this.pickColor(linkColor || 'none', function(color)
{
linkColor = color;
updateLinkColor();
});
mxEvent.consume(evt);
}));
div.appendChild(linkButton);
mxUtils.br(div);
var linkSection = this.addLinkSection(div);
var zoom = this.addCheckbox(div, mxResources.get('zoom'), true, null, true);
mxUtils.write(div, ':');
@ -3211,11 +3250,11 @@
var dlg = new CustomDialog(this, div, mxUtils.bind(this, function()
{
fn((publicUrlRadio.checked) ? publicUrl : null, zoom.checked, zoomInput.value, linkSelect.value,
linkColor, fit.checked, allPages.checked, layers.checked, lightbox.checked, edit.checked);
fn((publicUrlRadio.checked) ? publicUrl : null, zoom.checked, zoomInput.value, linkSection.getTarget(),
linkSection.getColor(), fit.checked, allPages.checked, layers.checked, lightbox.checked, edit.checked);
}), null, mxResources.get('create'), 'https://desk.draw.io/support/solutions/articles/16000042542-how-to-embed-html-');
this.showDialog(dlg.container, 320, 360, true, true);
linkSelect.focus();
linkSection.focus();
};
/**
@ -3289,9 +3328,9 @@
widthInput.setAttribute('type', 'text');
widthInput.style.marginRight = '16px';
widthInput.style.width = '50px';
widthInput.style.marginTop = '16px';
widthInput.style.marginLeft = '6px';
widthInput.style.marginRight = '16px';
widthInput.style.marginBottom = '10px';
widthInput.value = '100%';
div.appendChild(widthInput);
@ -3301,81 +3340,15 @@
heightInput = document.createElement('input');
heightInput.setAttribute('type', 'text');
heightInput.style.width = '50px';
heightInput.style.marginTop = '16px';
heightInput.style.marginLeft = '6px';
heightInput.style.marginBottom = '6px';
heightInput.style.marginBottom = '10px';
heightInput.value = height + 'px';
div.appendChild(heightInput);
mxUtils.br(div);
}
mxUtils.write(div, mxResources.get('link') + ':');
var linkSelect = document.createElement('select');
linkSelect.style.width = '100px';
linkSelect.style.marginLeft = '6px';
linkSelect.style.marginRight = '10px';
linkSelect.className = 'geBtn';
var autoOption = document.createElement('option');
autoOption.setAttribute('value', 'auto');
mxUtils.write(autoOption, mxResources.get('automatic'));
linkSelect.appendChild(autoOption);
var blankOption = document.createElement('option');
blankOption.setAttribute('value', 'blank');
mxUtils.write(blankOption, mxResources.get('openInNewWindow'));
linkSelect.appendChild(blankOption);
var selfOption = document.createElement('option');
selfOption.setAttribute('value', 'self');
mxUtils.write(selfOption, mxResources.get('openInThisWindow'));
linkSelect.appendChild(selfOption);
div.appendChild(linkSelect);
mxUtils.write(div, mxResources.get('borderColor') + ':');
var linkButton = document.createElement('button');
linkButton.style.width = '18px';
linkButton.style.height = '18px';
linkButton.style.marginLeft = '6px';
linkButton.style.backgroundPosition = 'center center';
linkButton.style.backgroundRepeat = 'no-repeat';
var linkColor = '#0000ff';
function updateLinkColor()
{
if (linkColor == null || linkColor == mxConstants.NONE)
{
linkButton.style.backgroundColor = '';
linkButton.style.backgroundImage = 'url(\'' + Dialog.prototype.noColorImage + '\')';
}
else
{
linkButton.style.backgroundColor = linkColor;
linkButton.style.backgroundImage = '';
}
};
updateLinkColor();
mxEvent.addListener(linkButton, 'click', mxUtils.bind(this, function(evt)
{
this.pickColor(linkColor || 'none', function(color)
{
linkColor = color;
updateLinkColor();
});
mxEvent.consume(evt);
}));
div.appendChild(linkButton);
mxUtils.br(div);
var linkSection = this.addLinkSection(div);
var hasPages = this.pages != null && this.pages.length > 1;
var allPages = null;
@ -3407,13 +3380,13 @@
var dlg = new CustomDialog(this, div, mxUtils.bind(this, function()
{
fn(linkSelect.value, linkColor,
fn(linkSection.getTarget(), linkSection.getColor(),
(allPages == null) ? true : allPages.checked,
lightbox.checked, edit.checked, layers.checked,
(widthInput != null) ? widthInput.value : null,
(heightInput != null) ? heightInput.value : null);
}), null, mxResources.get('create'));
this.showDialog(dlg.container, 280, 250 + dy, true, true);
this.showDialog(dlg.container, 280, 240 + dy, true, true);
if (widthInput != null)
{
@ -3430,7 +3403,7 @@
}
else
{
linkSelect.focus();
linkSection.focus();
}
};

View file

@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+w.join(",")+"}";f=s;return r}}"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.0.3.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.0.3.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/")||
@ -358,7 +358,7 @@ mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=
mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(b){mxSvgCanvas2D.prototype.useDomParser=!1}})();mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.cacheOffsetSize=!0;mxSvgCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,b=a.lastIndexOf("#");0<b&&(a=a.substring(0,b));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};
mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);var c=this.root.ownerDocument.createElement(a);null!=b&&c.setAttribute("xmlns",b);return c};
@ -382,9 +382,9 @@ mxSvgCanvas2D.prototype.setLink=function(a){if(null==a)this.root=this.originalRo
mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b!=c){var g=b?d:0,h=b?-1:1,k=c?e:0,l=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(k)+")scale("+this.format(h)+","+this.format(l)+")translate("+this.format(-g)+","+this.format(-k)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",Math.round((a+c/2+e.dx)*e.scale));f.setAttribute("cy",Math.round((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale));l.setAttribute("y",this.format(b*k.scale));l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",e);f||l.setAttribute("preserveAspectRatio",
"none");(1>k.alpha||1>k.fillAlpha)&&l.setAttribute("opacity",k.alpha*k.fillAlpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n*k.scale+","+p*k.scale+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),l.setAttribute("visibility","hidden"),
l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale)+this.imageOffset);l.setAttribute("y",this.format(b*k.scale)+this.imageOffset);l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",e);f||l.setAttribute("preserveAspectRatio","none");(1>k.alpha||1>k.fillAlpha)&&l.setAttribute("opacity",k.alpha*k.fillAlpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n*k.scale+","+p*k.scale+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),
l.setAttribute("visibility","hidden"),l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
mxSvgCanvas2D.prototype.convertHtml=function(a){if(this.useDomParser){var b=(new DOMParser).parseFromString(a,"text/html");null!=b&&(a=(new XMLSerializer).serializeToString(b.body),"\x3cbody"==a.substring(0,5)&&(a=a.substring(a.indexOf("\x3e",5)+1)),"\x3c/body\x3e"==a.substring(a.length-7,a.length)&&(a=a.substring(0,a.length-7)))}else{if(null!=document.implementation&&null!=document.implementation.createDocument){var b=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),
c=b.createElement("body");b.documentElement.appendChild(c);var d=document.createElement("div");d.innerHTML=a;for(a=d.firstChild;null!=a;)d=a.nextSibling,c.appendChild(b.adoptNode(a)),a=d;return c.innerHTML}b=document.createElement("textarea");b.innerHTML=a.replace(/&amp;/g,"\x26amp;amp;").replace(/&#60;/g,"\x26amp;lt;").replace(/&#62;/g,"\x26amp;gt;").replace(/&lt;/g,"\x26amp;lt;").replace(/&gt;/g,"\x26amp;gt;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;");a=b.value.replace(/&/g,"\x26amp;").replace(/&amp;lt;/g,
"\x26lt;").replace(/&amp;gt;/g,"\x26gt;").replace(/&amp;amp;/g,"\x26amp;").replace(/<br>/g,"\x3cbr /\x3e").replace(/<hr>/g,"\x3chr /\x3e").replace(/(<img[^>]+)>/gm,"$1 /\x3e")}return a};
@ -1661,42 +1661,42 @@ g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if
Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=0;c<b.length;c++){var d=this.view.getState(a[c]);if(null!=d){var e=this.getCellGeometry(b[c]);null!=e&&e.relative&&(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}for(var d=new mxCodec,e=new mxGraphModel,f=e.getChildAt(e.getRoot(),0),c=0;c<a.length;c++)e.add(f,b[c]);
return d.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=
null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.ceil(h.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(h.height*a)+2*
c+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-0.5:0;l.textOffset=e?-0.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,u){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&
f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style",
"italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline");mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&
p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=
b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else if((b=document.selection)&&"Control"!=b.type)a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select()};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:
1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,
b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.initTouch=
function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);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,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=
!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=
function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&
a.select()}catch(d){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,
mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&
null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=
d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else{a=a.firstChild;for(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)?a.parentNode.removeChild(a):(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")))}h.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){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"\x3cbr/\x3e"):h,!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,g=(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=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,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 h=mxUtils.htmlEntities(this.textarea.innerHTML);!mxClient.IS_QUIRKS&&8!=document.documentMode&&(h=mxUtils.replaceTrailingNewlines(h,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"\x3cbr\x3e"):h,!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!=
h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=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="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=
this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"\x3cbr/\x3e"));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,
"\x3cbr/\x3e").replace(/\n/g,"\x3cbr/\x3e"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);try{this.graph.container.focus()}catch(b){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)){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 n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,
d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=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 p=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=p.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+"\x26deg;":(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\x3d\x3d":
c+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-0.5:0;l.textOffset=e?-0.5:0;l.imageOffset=e?-0.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,u){var q=this.state;if(null!=this.foAltText&&
(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline");mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,
b){(f||a.view.graph.isCellSelected(a.cell))&&p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=
function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else if((b=document.selection)&&"Control"!=b.type)a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select()};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],
d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};
Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&
b.createRange().pasteHTML(a)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);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,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);
return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,
c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(d){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),
d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=
a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else{a=a.firstChild;for(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)?a.parentNode.removeChild(a):(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")))}h.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){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"\x3cbr/\x3e"):h,!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,g=(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=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=
h&&(this.textarea.innerHTML=h,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 h=mxUtils.htmlEntities(this.textarea.innerHTML);!mxClient.IS_QUIRKS&&8!=document.documentMode&&(h=mxUtils.replaceTrailingNewlines(h,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));h=this.graph.sanitizeHtml(b?
h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"\x3cbr\x3e"):h,!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!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=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="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,
b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"\x3cbr/\x3e"));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,"\x3cbr/\x3e").replace(/\n/g,"\x3cbr/\x3e"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);try{this.graph.container.focus()}catch(b){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,
arguments),this.graph.isCellDeletable(a.cell)){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 n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=
a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=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 p=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=p.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+"\x26deg;":(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\x3d\x3d":
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\x3d":
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\x3d\x3d":

View file

@ -4965,6 +4965,7 @@ if (typeof mxVertexHandler != 'undefined')
var svgCanvas = this.createSvgCanvas(node);
svgCanvas.foOffset = (crisp) ? -0.5 : 0;
svgCanvas.textOffset = (crisp) ? -0.5 : 0;
svgCanvas.imageOffset = (crisp) ? -0.5 : 0;
svgCanvas.translate(Math.floor((border / scale - bounds.x) / vs), Math.floor((border / scale - bounds.y) / vs));
// Adds simple text fallback for viewers with no support for foreignObjects

82
war/js/reader.min.js vendored
View file

@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+w.join(",")+"}";f=s;return r}}"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.0.3.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.0.3.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/")||
@ -358,7 +358,7 @@ mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=
mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(b){mxSvgCanvas2D.prototype.useDomParser=!1}})();mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
mxSvgCanvas2D.prototype.cacheOffsetSize=!0;mxSvgCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,b=a.lastIndexOf("#");0<b&&(a=a.substring(0,b));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};
mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);var c=this.root.ownerDocument.createElement(a);null!=b&&c.setAttribute("xmlns",b);return c};
@ -382,9 +382,9 @@ mxSvgCanvas2D.prototype.setLink=function(a){if(null==a)this.root=this.originalRo
mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b!=c){var g=b?d:0,h=b?-1:1,k=c?e:0,l=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(k)+")scale("+this.format(h)+","+this.format(l)+")translate("+this.format(-g)+","+this.format(-k)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",Math.round((a+c/2+e.dx)*e.scale));f.setAttribute("cy",Math.round((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale));l.setAttribute("y",this.format(b*k.scale));l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",e);f||l.setAttribute("preserveAspectRatio",
"none");(1>k.alpha||1>k.fillAlpha)&&l.setAttribute("opacity",k.alpha*k.fillAlpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n*k.scale+","+p*k.scale+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),l.setAttribute("visibility","hidden"),
l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale)+this.imageOffset);l.setAttribute("y",this.format(b*k.scale)+this.imageOffset);l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",e);f||l.setAttribute("preserveAspectRatio","none");(1>k.alpha||1>k.fillAlpha)&&l.setAttribute("opacity",k.alpha*k.fillAlpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n*k.scale+","+p*k.scale+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),
l.setAttribute("visibility","hidden"),l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
mxSvgCanvas2D.prototype.convertHtml=function(a){if(this.useDomParser){var b=(new DOMParser).parseFromString(a,"text/html");null!=b&&(a=(new XMLSerializer).serializeToString(b.body),"\x3cbody"==a.substring(0,5)&&(a=a.substring(a.indexOf("\x3e",5)+1)),"\x3c/body\x3e"==a.substring(a.length-7,a.length)&&(a=a.substring(0,a.length-7)))}else{if(null!=document.implementation&&null!=document.implementation.createDocument){var b=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),
c=b.createElement("body");b.documentElement.appendChild(c);var d=document.createElement("div");d.innerHTML=a;for(a=d.firstChild;null!=a;)d=a.nextSibling,c.appendChild(b.adoptNode(a)),a=d;return c.innerHTML}b=document.createElement("textarea");b.innerHTML=a.replace(/&amp;/g,"\x26amp;amp;").replace(/&#60;/g,"\x26amp;lt;").replace(/&#62;/g,"\x26amp;gt;").replace(/&lt;/g,"\x26amp;lt;").replace(/&gt;/g,"\x26amp;gt;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;");a=b.value.replace(/&/g,"\x26amp;").replace(/&amp;lt;/g,
"\x26lt;").replace(/&amp;gt;/g,"\x26gt;").replace(/&amp;amp;/g,"\x26amp;").replace(/<br>/g,"\x3cbr /\x3e").replace(/<hr>/g,"\x3chr /\x3e").replace(/(<img[^>]+)>/gm,"$1 /\x3e")}return a};
@ -1661,42 +1661,42 @@ g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if
Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=0;c<b.length;c++){var d=this.view.getState(a[c]);if(null!=d){var e=this.getCellGeometry(b[c]);null!=e&&e.relative&&(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}for(var d=new mxCodec,e=new mxGraphModel,f=e.getChildAt(e.getRoot(),0),c=0;c<a.length;c++)e.add(f,b[c]);
return d.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=
null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.ceil(h.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(h.height*a)+2*
c+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-0.5:0;l.textOffset=e?-0.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,u){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&
f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style",
"italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline");mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&
p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=
b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else if((b=document.selection)&&"Control"!=b.type)a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select()};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:
1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,
b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.initTouch=
function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);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,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=
!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=
function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&
a.select()}catch(d){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,
mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&
null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=
d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else{a=a.firstChild;for(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)?a.parentNode.removeChild(a):(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")))}h.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){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"\x3cbr/\x3e"):h,!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,g=(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=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,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 h=mxUtils.htmlEntities(this.textarea.innerHTML);!mxClient.IS_QUIRKS&&8!=document.documentMode&&(h=mxUtils.replaceTrailingNewlines(h,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"\x3cbr\x3e"):h,!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!=
h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=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="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=
this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"\x3cbr/\x3e"));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,
"\x3cbr/\x3e").replace(/\n/g,"\x3cbr/\x3e"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);try{this.graph.container.focus()}catch(b){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)){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 n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,
d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=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 p=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=p.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+"\x26deg;":(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\x3d\x3d":
c+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-0.5:0;l.textOffset=e?-0.5:0;l.imageOffset=e?-0.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,u){var q=this.state;if(null!=this.foAltText&&
(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline");mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,
b){(f||a.view.graph.isCellSelected(a.cell))&&p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=
function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else if((b=document.selection)&&"Control"!=b.type)a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select()};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],
d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};
Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&
b.createRange().pasteHTML(a)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);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,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);
return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,
c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(d){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),
d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=
a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else{a=a.firstChild;for(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)?a.parentNode.removeChild(a):(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")))}h.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){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"\x3cbr/\x3e"):h,!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,g=(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=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=
h&&(this.textarea.innerHTML=h,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 h=mxUtils.htmlEntities(this.textarea.innerHTML);!mxClient.IS_QUIRKS&&8!=document.documentMode&&(h=mxUtils.replaceTrailingNewlines(h,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));h=this.graph.sanitizeHtml(b?
h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"\x3cbr\x3e"):h,!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!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=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="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,
b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"\x3cbr/\x3e"));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,"\x3cbr/\x3e").replace(/\n/g,"\x3cbr/\x3e"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);try{this.graph.container.focus()}catch(b){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,
arguments),this.graph.isCellDeletable(a.cell)){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 n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=
a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=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 p=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=p.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+"\x26deg;":(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\x3d\x3d":
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\x3d":
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\x3d\x3d":

942
war/js/viewer.min.js vendored

File diff suppressed because it is too large Load diff